This repository contains scripts and tools for load testing Kyverno.
k6/tests- contains the k6 testsk6/rbac- contains the necessary RBAC resources to run testsk6/run.sh- contains a scaffold for running the tests
You can use make to run the tests through the run target. You can basically pass it any arguments you would pass to k6 run.
make run -- k6/tests/kyverno-pss.js -e SCENARIO=breakpointOr,
make run -- k6/tests/kyverno-pss.js --vus 100 --iterations 1000This will install k6 and run the test k6/tests/kyverno-pss.js with 100 virtual users and 1000 iterations.
The tests are designed to simulate a real-world scenario where a user is creating, updating, and deleting resources in a Kubernetes cluster. The tests are designed to be run against a Kyverno policy that enforces its rules on the resources.