1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 09:26:54 +00:00
kyverno/test/cli/test-validating-admission-policy/with-match-conditions/kyverno-test.yaml
Mariam Fahmy 798950f72c
fix: return skip when celPreconditions/matchConditions aren't met (#9940)
* fix: return skip when cel preconditions aren't met

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

* fix test

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

* fix: return skip when matchConditions in VAPs aren't met

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

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-04-22 13:49:25 +00:00

27 lines
512 B
YAML

apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: kyverno-test.yaml
policies:
- disallow-host-path.yaml
resources:
- resources.yaml
results:
- isValidatingAdmissionPolicy: true
kind: Pod
policy: disallow-host-path
resources:
- bad-pod
result: fail
- isValidatingAdmissionPolicy: true
kind: Pod
policy: disallow-host-path
resources:
- good-pod
result: pass
- isValidatingAdmissionPolicy: true
kind: Pod
policy: disallow-host-path
resources:
- skipped-pod
result: skip