Skip to content

vishnudasEH/blackadder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Blackadder - a chaos engineering operator

This a companion repository for the article in the German Entwickler magazine about writing Kubernetes Operators with Python.

The Operator's algorithm in pseudo code is:

client = connect_to_kubernetes()

# retrieves our agent configuration from the kube-api-server
chaos_agent = client.get_chaos_agent()

while True:
      pods = client.list_pods(exclude_namespaces)
      deployments = client.list_deployments(exclude_namespaces)
      namespaces =   client.list_configmaps(exclude_namespaces)
      
      if chaos_agent.tantrum:
         randomly_kill_pods(pods, chaos_agent.tolerance, chaos_agent.eagerness)

      if chaos_agent.cancer:
         randomly_scale_deployments(deployments, chaos_agent.eagerness)
      
      if chaos_agent.ipsum:
         randomly_write_configmaps(configmaps, chaos_agent.eagerness)

      time.sleep(chaos_agent.pause)

WARNING

DON'T RUN THIS IN PRODUCTION !!!
DON'T RUN THIS IN PRODUCTION !!!
DON'T RUN THIS IN PRODUCTION !!!

Why the name?

The name is obvisiouly inspired from the british comedy The Blackadder.

About

A little chaos engineering operator implemented in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 77.9%
  • Dockerfile 14.9%
  • Makefile 7.2%