1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-15 17:50:58 +00:00
policy-reporter/policy.yaml
Frank Jogeleit 78f24497fa
Policy Reporter v3 (#482)
Policy Reporter v3

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2024-10-07 11:10:46 +02:00

22 lines
No EOL
486 B
YAML

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: "?*"