1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 01:46:55 +00:00
kyverno/test/conformance/chainsaw/cli/apply/apply-on-cluster-scoped-resources/policy.yaml

20 lines
476 B
YAML
Raw Normal View History

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: restrict-binding-system-groups
spec:
validationFailureAction: Enforce
background: true
rules:
- name: restrict-masters
match:
any:
- resources:
kinds:
- RoleBinding
- ClusterRoleBinding
validate:
message: "Binding to system:masters is not allowed."
pattern:
roleRef:
name: "!system:masters"