mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-14 11:57:32 +00:00
22 lines
486 B
YAML
22 lines
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: "?*"
|