华为云UCS-k8spspcapabilities:符合策略实例的资源定义

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

符合策略实例的资源定义

示例capabilities中的各项参数符合策略实例。

apiVersion: v1
kind: Pod
metadata:
  name: opa-allowed
  labels:
    owner: me.agilebank.demo
spec:
  containers:
    - name: opa
      image: openpolicyagent/opa:0.9.2
      args:
        - "run"
        - "--server"
        - "--addr=localhost:8080"
      securityContext:
        capabilities:
          add: ["something"]
          drop: ["must_drop", "another_one"]
      resources:
        limits:
          cpu: "100m"
          memory: "30Mi"
support.huaweicloud.com/usermanual-ucs/ucs_01_0228.html