1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00
policy-reporter/policy.yaml

22 lines
486 B
YAML
Raw Normal View History

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-labels
spec:
validationFailureAction: Audit
rules:
- name: check-for-labels
match:
any:
- resources:
kinds:
- Pod
namespaces:
- policy-reporter
validate:
message: "label 'app.kubernetes.io/test' is required"
pattern:
metadata:
labels:
app.kubernetes.io/test: "?*"