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

时间:2025-02-12 15:05:17

策略实例示例

示例声明了match匹配的对象不能把automountServiceAccountToken字段设为true。

apiVersion: constraints.gatekeeper.sh/v1beta1kind: K8sPSPAutomountServiceAccountTokenPodmetadata:  name: psp-automount-serviceaccount-token-podspec:  match:    kinds:      - apiGroups: [""]        kinds: ["Pod"]    excludedNamespaces: ["kube-system"] 
support.huaweicloud.com/usermanual-ucs/ucs_01_0248.html