https://github.com/jamf/kyverno-test-util
https://github.com/jamf/kyverno-test-util
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jamf/kyverno-test-util
- Owner: jamf
- License: mit
- Created: 2023-04-24T11:29:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-16T20:46:52.000Z (about 3 years ago)
- Last Synced: 2025-03-26T05:44:37.203Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kyverno Test Util
A repository for python script that's meant to prepare test file for kyverno cli.
## The problem
[Kyverno CLI](https://kyverno.io/docs/kyverno-cli/#test) delivers `test` command which allows users to perform policy validations against k8s resources.
What it lacks is an ability to validate all resources from folder A against policies defined in folder B.
## The solution
This script allows users to simply run
```bash
python kyverno-test-util.py
```
Above command will produce `kyverno-test.yaml` file, which can then be used as an input to `kyverno test` command:
```bash
kyverno test ./kyverno-test.yaml
```