1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 01:46:55 +00:00
kyverno/test/cli/test-exceptions/exceptions-2/exception.yaml
Mariam Fahmy 406cb5d32b
chore: add tests for exceptions in the CLI (#9781)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-02-26 07:57:47 +00:00

21 lines
426 B
YAML

apiVersion: kyverno.io/v2beta1
kind: PolicyException
metadata:
name: container-exception
spec:
exceptions:
- policyName: max-containers
ruleNames:
- max-two-containers
- autogen-max-two-containers
match:
any:
- resources:
kinds:
- Pod
- Deployment
conditions:
any:
- key: "{{ request.object.metadata.labels.color || '' }}"
operator: Equals
value: blue