1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/conformance/chainsaw/webhooks/pod-all-subresources/policy.yaml
Charles-Edouard Brétéché af14780f5c
chore: run tests with chainsaw (#8762)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-10-27 16:33:58 +00:00

22 lines
482 B
YAML

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-labels
annotations:
pod-policies.kyverno.io/autogen-controllers: none
spec:
validationFailureAction: Audit
background: false
rules:
- name: require-team
match:
any:
- resources:
kinds:
- Pod/*
validate:
message: 'The label `team` is required.'
pattern:
metadata:
labels:
team: '?*'