1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 01:16:55 +00:00
kyverno/test/cli/test-cel-exceptions/check-deployment-labels/exception.yaml
Mariam Fahmy 76751b96b3
feat: support celexceptions in the CLI apply command (#12182)
* feat: support celexceptions in the CLI

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

* feat: add unit tests

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-02-19 08:38:44 +00:00

12 lines
No EOL
295 B
YAML

apiVersion: policies.kyverno.io/v1alpha1
kind: CELPolicyException
metadata:
name: exclude-namespace
spec:
policyRefs:
- name: "check-deployment-labels"
kind: ValidatingPolicy
matchConditions:
- name: "check-namespace"
expression: "object.metadata.namespace == 'test-ns'"