mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
* chore: bump chainsaw * more template use * v0.2.10 * go mod --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> |
||
---|---|---|
.. | ||
chainsaw-test.yaml | ||
exceptions.yaml | ||
pod.yaml | ||
policy-assert.yaml | ||
policy.yaml | ||
README.md | ||
report-fail-assert.yaml | ||
report-skip-assert.yaml |
Description
This test makes sure that the report is generated correctly when multiple exceptions are created for the same policy.
Expected Behavior
-
Create a pod with two init containers. The first init container should have the
NET_ADMIN
andNET_RAW
capabilities, and the second init container should have theSYS_TIME
capability. -
Create a policy that applies the baseline profile.
-
Create two exceptions for the init containters as follows:
- The first exception
init1-exception-baseline
allows the values ofNET_ADMIN
andNET_RAW
capabilities in the init containers. - The second exception
init2-exception-baseline
allows the values ofSYS_TIME
capabilities in the init containers.
- The first exception
-
It is expected that a policy report is generated with a
skip
result. -
Delete the first exception.
-
It is expected that a policy report is updated with a
fail
result since the first init container violates the policy and it isn't excluded by the second exception.
Reference Issue(s)
#10580