mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 01:46:55 +00:00
* Remove length restriction in --set Signed-off-by: anushkamittal2001 <anushka@nirmata.com> * Add variables in unit test for apply_command Signed-off-by: anushkamittal2001 <anushka@nirmata.com> --------- Signed-off-by: anushkamittal2001 <anushka@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
20 lines
No EOL
450 B
YAML
20 lines
No EOL
450 B
YAML
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: enforce-label
|
|
spec:
|
|
validationFailureAction: Audit
|
|
background: false
|
|
rules:
|
|
- name: enforce-label
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
validate:
|
|
message: "The foo label must be set."
|
|
pattern:
|
|
metadata:
|
|
labels:
|
|
op: "{{ request.operation }}" |