Skip to content

Delete a randomly chosen pod from a kubernetes cluster's namespace

Notifications You must be signed in to change notification settings

sandromodarelli/pod-chaos-monkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pylint Score

Pod Chaos Monkey

Deletes a randomly chosen pod from a kubernetes cluster's namespace

Pre-requisites

Installation

  • Build image with docker build -t pod-chaos-monkey:latest .

  • Push it to your registry, or if you're using KinD, load image into the cluster with kind load docker-image pod-chaos-monkey:latest

  • Now you're ready to deploy with helm upgrade -i pod-chaos-monkey chart/. -f helm-values.yaml (change the .image.repository value if using a remote registry)

To change helm release values, check the available values here

Here's the main application options:

Key Type Default Description
args.loglevel string "info" log verbosity
args.namespace string "workloads" watched namespace
args.sleep string "30" sleep time between pod deletions

Run tests and linter

Tests

  • Install pytest in your virtualenv with pip install pytest
  • Run tests with PYTHONPATH=./app pytest

Linter

  • nstall pylint in your virtualenv with pip install pylint
  • Run linter with PYTHONPATH=./app pylint app

Future Improvements

  1. run test and linter in CI
  2. add a kubernetes event every time the monkey deletes a pod

About

Delete a randomly chosen pod from a kubernetes cluster's namespace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published