mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-14 11:57:32 +00:00
78f24497fa
Policy Reporter v3 Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
22 lines
No EOL
486 B
YAML
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: "?*" |