Files
litmus-hub/charts/generic/pod-cpu-hog/experiment.yaml
2020-03-09 16:49:34 +05:30

61 lines
1.3 KiB
YAML

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.6
spec:
definition:
scope: Namespaced
permissions:
- apiGroups:
- ""
- "batch"
- "litmuschaos.io"
resources:
- "jobs"
- "pods"
- "events"
- "chaosengines"
- "chaosexperiments"
- "chaosresults"
verbs:
- "create"
- "list"
- "get"
- "patch"
- "update"
- "delete"
image: "litmuschaos/ansible-runner:latest"
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: '60' # in seconds
# Period to wait before injection of chaos in sec
- name: RAMP_TIME
value: ''
- name: LIB
value: 'litmus'
- name: LIB_IMAGE
value: 'litmuschaos/app-cpu-stress:latest'
labels:
name: pod-cpu-hog