mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-10 01:46:55 +00:00
* fix: return policies with either audit or enforce rules from the cache Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * feat: introduce validationFailureAction under verifyImage rules Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * feat: add chainsaw tests Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> * fix Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> --------- Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com> |
||
---|---|---|
.. | ||
bad-pod-01.yaml | ||
bad-pod-02.yaml | ||
chainsaw-test.yaml | ||
exception.yaml | ||
good-pod.yaml | ||
policy-assert.yaml | ||
policy.yaml | ||
README.md |
Description
This test creates an exception for the init containers to set the runAsNonRoot
to false
Expected Behavior
-
Create a policy that applies the restricted profile.
-
Create an exception for the init containters to set the
runAsNonRoot
to false. -
Create a pod with the following characteristics:
- The pod has an init container that sets the
runAsNonRoot
field tofalse
. - The pod has a container that doesn't set the
runAsNonRoot
field.
It is expected that the pod will be blocked with a message reporting the violation of the container. The init container is already excluded by the exception.
- The pod has an init container that sets the
-
Create a pod with the following characteristics:
- The pod has an init container that sets the
runAsNonRoot
field totrue
. - The pod has a container that doesn't set the
runAsNonRoot
field.
It is expected that the pod will be blocked with a message reporting the violation of the container.
- The pod has an init container that sets the
-
Create a pod with the following characteristics:
- The pod has an init container that sets the
runAsNonRoot
field tofalse
. - The pod has a container that doesn't set the
runAsNonRoot
field. runAsNonRoot
is set totrue
in the pod spec.
It is expected that the pod will be created successfully.
- The pod has an init container that sets the
Reference Issue(s)
#10581