policies
policies copied to clipboard
[Chainsaw Tests] Add Chainsaw tests for the sample policies
Problem Statement
Hi there👋
This is an umbrella issue for adding Chainsaw tests for Kyverno sample policies.
You can find references below to write tests:
Start by browsing the following sample policies, and you can pick up a task by:
- create a GitHub issue on kyverno/policies repo
- comment
/assignto get assigned - write your tests
- verify tests locally
- require a Kubernetes cluster
- require installing Chainsaw
- create the PR
- [ ] https://github.com/kyverno/policies/tree/main/aws/require-aws-node-irsa
- [ ] https://github.com/kyverno/policies/tree/main/best-practices/check-deprecated-apis
- [x] refactor https://github.com/kyverno/policies/tree/main/cert-manager/limit-dnsnames
- [x] refactor https://github.com/kyverno/policies/tree/main/cert-manager/limit-duration
- [x] refactor https://github.com/kyverno/policies/tree/main/cert-manager/restrict-issuer
- [x] https://github.com/kyverno/policies/tree/main/cleanup/cleanup-bare-pods
- [x] https://github.com/kyverno/policies/tree/main/cleanup/cleanup-empty-replicasets
- [ ] https://github.com/kyverno/policies/tree/main/other/advertise-node-extended-resources
- [x] https://github.com/kyverno/policies/tree/main/other/copy-namespace-labels
- [ ] https://github.com/kyverno/policies/tree/main/other/expiration-for-policyexceptions
- [ ] https://github.com/kyverno/policies/tree/main/other/namespace-protection
- [ ] https://github.com/kyverno/policies/tree/main/other/restrict-edit-for-endpoints
- [ ] https://github.com/kyverno/policies/tree/main/other/restrict-scale
- [ ] https://github.com/kyverno/policies/tree/main/other/restrict-service-account
- [x] https://github.com/kyverno/policies/tree/main/pod-security/baseline/disallow-proc-mount
- [ ] https://github.com/kyverno/policies/tree/main/pod-security/subrule/podsecurity-subrule-baseline
Solution Description
n/a
Example "Good" Resource
No response
Example "Bad" Resource
No response
Other Comments
No response
Slack discussion
No response
Troubleshooting
- [X] I have read and followed the documentation AND the troubleshooting guide.
- [X] I have verified the policy does not exist in the samples library.
Hei @realshuting, I created a new issue and PR, but were unable to assign myself. Can you do a review?
- https://github.com/kyverno/policies/issues/956
- https://github.com/kyverno/policies/pull/957
Removed line item to test procMount policy since it can't be tested without a specific feature gate we don't want to enable for all clusters.