mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
|
||
---|---|---|
.. | ||
chainsaw-test.yaml | ||
exception.yaml | ||
pod.yaml | ||
policy.yaml | ||
README.md |
Description
This test makes sure that Kyverno CLI apply works as expected when an exception matches a pod with a namespace selector in case of cluster mode. (i.e. --cluster
flag is set)
Steps
-
- Create a namespace
ns-1
- Create a namespace
-
- Label the namespace
ns-1
withkyverno.tess.io/mutateresource=false
- Label the namespace
-
- Create a pod
test-pod
in namespacens-1
- Create a pod
-
- Create a policy that requires pod to run as non-root user.
-
- Create an exception that matches any pod whose ns selector is
kyverno.tess.io/mutateresource=false
- Create an exception that matches any pod whose ns selector is
-
- Use
kyverno apply
command to apply the policy and the exception in a cluster mode. It is expected to have askip
as a result.
- Use