华为云UCS-k8scontainerrequests:策略实例示例

时间:2024-09-12 15:06:02

策略实例示例

示例配置了CPU和内存的最大Request。

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sContainerRequests
metadata:
  name: container-must-have-requests
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Pod"]
  parameters:
    cpu: "200m"
    memory: "1Gi"
support.huaweicloud.com/usermanual-ucs/ucs_01_0242.html