1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/test/conformance/chainsaw/cel-policy-exceptions/empty-policy-ref/exception.yaml
Mariam Fahmy 970c255765
feat: validate CELPolicyExceptions (#12083)
* feat: validate CELPolicyExceptions

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

* chore: add cel-policy-exceptions tests in the CI

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

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2025-02-05 15:01:11 +00:00

16 lines
No EOL
394 B
YAML

apiVersion: kyverno.io/v2alpha1
kind: CELPolicyException
metadata:
name: pod-security-exception
namespace: delta
spec:
matchConstraints:
resourceRules:
- apiGroups: ["apps"]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["pods"]
matchConditions:
- name: "check-namespace"
expression: "object.metadata.namespace == 'test-ns'"