mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
2140a0239b
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
20 lines
No EOL
446 B
YAML
20 lines
No EOL
446 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: enforce-label
|
|
spec:
|
|
background: false
|
|
rules:
|
|
- name: enforce-label
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
validate:
|
|
failureAction: Audit
|
|
message: "The foo label must be set."
|
|
pattern:
|
|
metadata:
|
|
labels:
|
|
op: "{{ request.operation }}" |