Runs in Kubernetes, kills random Kubernetes pods / nodes.
- Dry Run mode
- Randomise mode
- Num Pods to Delete
- make config filename configurable
- make grace period configurable
- Excluding namespaces for pod deletion
- Namespace inclusion option
- Dockerfile
- Missing tests for nodes
- CI in gitlab
- Reenable node deletion (setup test cluster to autoheal first)
- May need some threading?
- Num Nodes to Delete
- assertions for test_find_no_pods & test_find_no_nodes
The agent will run against the current Kubernetes context. In other words, it'll start finding and deleting pods/nodes against your locally authenticated cluster.
It is also designed to run within the cluster itself - acting on other resources accordingly. See ./go build and ./go deploy for pointers on how this works.
/// add note about RBAC here
You can specify a config file to set a number of options to change the agent's behaviour:
- Defaults are set in
class Configinchaos_agent/utils.py - When using
./go run, thelocal-config.yamlwill be loaded ... - ... or you can run the python directly through
pipenvand override it withexport CFG_FILE=/path/to/yaml. - In k8s, a
ConfigMapis used
I like to use wrappers through a ./go bash script to save my typing, see:
./go initto create your pip venv./go testto run pytest locally./go watch-teststo run pytest continuously for faster feedback- You can also
./go runto run the tool locally - this will connect to your current kubectl context and try to do stuff!- by default the config uses dry-run mode (prints what it would do, rather than delete stuff), but if you've changed it ... ;)