Add kube-monkey support to Auto DevOps
Problem to solve
#27089 will give us the ability to install kube-monkey with one click, however, all configuration and annotations must still be done manually.
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
enabled, we can use defaults for all other labels and use them if user does not specify them explicitly.
||custom||yes||used to identify the pods that belong to a k8s app as Pods inherit labels from their k8s app|
||yes||Mean time between failure (in days)|
||yes||Default behavior is for kube-monkey to kill only ONE pod of your app. You can override this behavior|
||yes||Specify value for kill-mode, if
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