(feat)include charts for pod cpu chaos (#95)
Signed-off-by: ksatchit <karthik.s@mayadata.io> Co-authored-by: Amit Bhatt <33670159+amitbhatt818@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
11148896ea
commit
c5bc2cbd95
@@ -15,6 +15,7 @@ spec:
|
|||||||
- pod-network-loss
|
- pod-network-loss
|
||||||
- pod-delete
|
- pod-delete
|
||||||
- container-kill
|
- container-kill
|
||||||
|
- pod-cpu-hog
|
||||||
- pod-network-latency
|
- pod-network-latency
|
||||||
- drain-node
|
- drain-node
|
||||||
|
|
||||||
|
@@ -12,6 +12,9 @@ experiments:
|
|||||||
- name: pod-network-latency
|
- name: pod-network-latency
|
||||||
CSV: pod-network-latency.chartserviceversion.yaml
|
CSV: pod-network-latency.chartserviceversion.yaml
|
||||||
desc: "pod-network-latency"
|
desc: "pod-network-latency"
|
||||||
|
- name: pod-cpu-hog
|
||||||
|
CSV: pod-cpu-hog.chartserviceversion.yaml
|
||||||
|
desc: "pod-cpu-hog"
|
||||||
- name: cpu-hog
|
- name: cpu-hog
|
||||||
CSV: cpu-hog.chartserviceversion.yaml
|
CSV: cpu-hog.chartserviceversion.yaml
|
||||||
desc: "cpu-hog"
|
desc: "cpu-hog"
|
||||||
|
BIN
charts/generic/icons/pod-cpu-hog.png
Normal file
BIN
charts/generic/icons/pod-cpu-hog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
55
charts/generic/pod-cpu-hog/experiment.yaml
Normal file
55
charts/generic/pod-cpu-hog/experiment.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Injects cpu consumption on pods belonging to an app deployment
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: pod-cpu-hog
|
||||||
|
version: 0.1.0
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
permissions:
|
||||||
|
apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/exec"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "delete"
|
||||||
|
image: "litmuschaos/ansible-runner:ci"
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ansible-playbook ./experiments/generic/pod_cpu_hog/pod_cpu_hog_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
- name: ANSIBLE_STDOUT_CALLBACK
|
||||||
|
value: 'default'
|
||||||
|
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: CPU_CORES
|
||||||
|
value: '1'
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60000' #in ms
|
||||||
|
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/app-cpu-stress:latest'
|
||||||
|
labels:
|
||||||
|
name: pod-cpu-hog
|
@@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: pod-cpu-hog
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.kubernetes.io/
|
||||||
|
spec:
|
||||||
|
displayName: pod-cpu-hog
|
||||||
|
categoryDescription: |
|
||||||
|
Pod-CPU-Hog contains chaos to consume CPU resouces of specified containers in Kubernetes pods.
|
||||||
|
- Causes high CPU resource consumption utilizing one or more cores by triggering md5sum commands
|
||||||
|
- The application pod should be healthy once chaos is stopped. Expectation is that service-requests should be served despite chaos.
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- CPU
|
||||||
|
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
|
||||||
|
- name: Docs
|
||||||
|
url: https://docs.litmuschaos.io/docs/pod-cpu-hog/
|
||||||
|
icon:
|
||||||
|
- base64data: ""
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod-cpu-hog/experiment.yaml
|
Reference in New Issue
Block a user