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/resources.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

52 lines
881 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: skipped-pod
labels:
color: blue
spec:
containers:
- name: nginx-container
image: nginx:latest
volumeMounts:
- name: hostpath-volume
mountPath: /var/www/html
volumes:
- name: hostpath-volume
hostPath:
path: /var/log
---
apiVersion: v1
kind: Pod
metadata:
name: bad-pod
labels:
color: red
spec:
containers:
- name: nginx-container
image: nginx:latest
volumeMounts:
- name: hostpath-volume
mountPath: /var/www/html
volumes:
- name: hostpath-volume
hostPath:
path: /var/log
---
apiVersion: v1
kind: Pod
metadata:
name: good-pod
labels:
color: red
spec:
containers:
- name: nginx-container
image: nginx:latest
volumeMounts:
- name: hostpath-volume
mountPath: /var/www/html
volumes:
- name: hostpath-volume
emptyDir: {}