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

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

策略实例示例

以下策略实例展示了策略定义生效的资源类型。

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sPSPFSGroup
metadata:
  name: psp-fsgroup
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Pod"]
  parameters:
    rule: "MayRunAs" #"MustRunAs" #"MayRunAs", "RunAsAny"
    ranges:
    - min: 1
      max: 1000
support.huaweicloud.com/usermanual-ucs/ucs_01_0225.html