mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 09:26:54 +00:00
|
||
---|---|---|
.. | ||
chainsaw-test.yaml | ||
deployment-assert.yaml | ||
deployment.yaml | ||
ns.yaml | ||
policy.yaml | ||
README.md | ||
report-assert.yaml |
Description
This test checks that policy reports are generated successfully as a result of applying the ValidatingAdmissionPolicy with its binding to a resource.
Steps
-
- Create a
staging-ns-1
namespace whose label isenvironment: staging-ns-1
- Create a
-
- Create a Deployment named
deployment-4
with 3 replicas in thestaging-ns-1
namespace.
- Create a Deployment named
-
- Create a ValidatingAdmissionPolicy that checks deployment replicas to be less than or equal to 5.
- Create a ValidatingAdmissionPolicyBinding that matches resources whose namespace has a label of
environment: staging
.
-
- A policy report is generated for
deployment-4
with a pass result.
- A policy report is generated for