Add kube-monkey support to Auto DevOps

Problem to solve

#27089 (closed) will give us the ability to install kube-monkey with one click, however, all configuration and annotations must still be done manually.

Intended users

developers, operators

Further details

Proposal

If user has installed kube-monkey in their Kubernetes cluster, allow application to opt-in to chaos through the use of env variables which auto-deploy will use to annotate the user's app.

When user sets kube-monkey/enabled to enabled, we can use defaults for all other labels and use them if user does not specify them explicitly.

variable value default? description
kube-monkey/enabled enabled no sets kube-monkey/enabled value to enabled on user's deployment
kube-monkey/identifier custom yes used to identify the pods that belong to a k8s app as Pods inherit labels from their k8s app
kube-monkey/mtbf 2 yes Mean time between failure (in days)
kube-monkey/kill-mode fixed yes Default behavior is for kube-monkey to kill only ONE pod of your app. You can override this behavior
kube-monkey/kill-value 1 yes Specify value for kill-mode, if fixed provide an integer of pods to kill

Once user has enabled chaos, auto-deploy to annotate deployment with relevant values

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: monkey-victim
  namespace: app-namespace
spec:
  template:
    metadata:
      labels:
        kube-monkey/enabled: enabled
        kube-monkey/identifier: monkey-victim
        kube-monkey/mtbf: '2'
        kube-monkey/kill-mode: "fixed"
        kube-monkey/kill-value: '1'

See https://github.com/asobti/kube-monkey for further info

Permissions and Security

Documentation

Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited Mar 22, 2023 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading