1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 18:06:55 +00:00
kyverno/test/conformance/chainsaw/exceptions/multiple-exceptions
Mariam Fahmy 716611b7ea
fix: return all the exceptions that match the incoming resource (#10722)
* fix: return all the exceptions that match the incoming resource

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

* fix: modify log messages

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

---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-25 17:36:19 +00:00
..
chainsaw-test.yaml
exceptions.yaml
pod.yaml
policy-assert.yaml
policy.yaml
README.md

Description

This test creates two policy exceptions that match the same policy. It is expected that the pod that satisfies both exceptions will be created successfully.

Expected Behavior

  1. Create a policy that applies the baseline profile.

  2. Create two exceptions as follows:

    • The first exception exception-baseline that exempts the whole pod from the baseline profile.
    • The second exception init-exception-baseline allows the values of SYS_TIME capabilities in the init containers.
  3. Create a pod with two init containers. The first init container should have the NET_ADMIN and NET_RAW capabilities, and the second init container should have the SYS_TIME capability. It is expected that the pod will be created successfully as it matches both exceptions.

Reference Issue(s)

#10580