1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 18:06:55 +00:00
kyverno/test/cli/apply/policies-set/policy.yaml
anushkamittal2001 5272ca8601
Remove length restriction in --set (#7984)
* 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>
2023-08-14 14:13:29 +00:00

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 }}"