diff --git a/charts/generic/cpu-hog/cpu-hog.chartserviceversion.yaml b/charts/generic/cpu-hog/cpu-hog.chartserviceversion.yaml new file mode 100644 index 0000000..dc1ff9e --- /dev/null +++ b/charts/generic/cpu-hog/cpu-hog.chartserviceversion.yaml @@ -0,0 +1,40 @@ +apiVersion: litmuchaos.io/v1alpha1 +kind: ChartServiceVersion +metadata: + name: cpu-hog + version: 0.0.1 + annotations: + categories: Kubernetes + vendor: CNCF + createdAt: 2019-08-12T10:28:08Z + repository: https://github.com/litmuschaos/chaos-charts + support: https://slack.kubernetes.io/ +spec: + displayName: cpu-hog + categoryDescription: | + CPU hog contains chaos to disrupt state of kubernetes resources. Experiments can inject a cpu skipe on a node where the application pod is scheduled. + - Causes (forced/graceful) cpu hog on a perticular node where the application deployment is available. + - After test the recovery should be manual of the application pod and node in case they are not in appropriate state. + + keywords: + - Kubernetes + - CPU + - State + platforms: + - GKE + maturity: alpha + maintainers: + - name: ksatchit + email: karthik.s@mayadata.io + minKubeVersion: 1.12.0 + provider: + name: Mayadata + links: + - name: Kubernetes Website + url: https://kubernetes.io + - name: Source Code + url: https://github.com/kubernetes/kubernetes + icon: + - url: + mediatype: "" + chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/cpu-hog/experiment.yaml diff --git a/charts/generic/cpu-hog/experiment.yaml b/charts/generic/cpu-hog/experiment.yaml new file mode 100644 index 0000000..d305785 --- /dev/null +++ b/charts/generic/cpu-hog/experiment.yaml @@ -0,0 +1,52 @@ +apiVersion: litmuschaos.io/v1alpha1 +description: + message: | + Give a cpu spike on a node belonging to a deployment +kind: ChaosExperiment +metadata: + name: cpu-hog + version: 0.0.1 +spec: + definition: + permissions: + apiGroups: + - "" + - "extensions" + - "apps" + - "batch" + - "litmuschaos.io" + resources: + - "daemonsets" + - "statefulsets" + - "deployments" + - "jobs" + - "nodes" + - "pods" + - "pods/exec" + - "chaosengines" + - "chaosexperiments" + - "chaosresults" + verbs: + - "*" + image: "litmuschaos/ansible-runner:ci" + args: + - -c + - ansible-playbook ./experiments/generic/cpu_hog/cpu_hog_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0 + command: + - /bin/bash + env: + + - name: ANSIBLE_STDOUT_CALLBACK + value: 'default' + + - name: TOTAL_CHAOS_DURATION + value: '60' + + - name: PLATFORM + value: 'ANY' + + - name: LIB + value: '' + + labels: + name: cpu-hog