apiVersion: litmuschaos.io/v1alpha1 description: message: | Give a cpu spike on a node belonging to a deployment kind: ChaosExperiment metadata: name: node-cpu-hog version: 0.1.18 spec: definition: scope: Cluster permissions: - apiGroups: - "" - "batch" - "apps" - "litmuschaos.io" resources: - "jobs" - "pods" - "pods/log" - "events" - "chaosengines" - "chaosexperiments" - "chaosresults" verbs: - "create" - "list" - "get" - "patch" - "update" - "delete" - apiGroups: - "" resources: - "nodes" verbs: - "get" - "list" image: "litmuschaos/ansible-runner:latest" imagePullPolicy: Always args: - -c - ansible-playbook ./experiments/generic/node_cpu_hog/node_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' # Period to wait before and after injection of chaos in sec - name: RAMP_TIME value: '' ## ENTER THE NUMBER OF CORES OF CPU FOR CPU HOGGING ## OPTIONAL VALUE IN CASE OF EMPTY VALUE IT WILL TAKE NODE CPU CAPACITY - name: NODE_CPU_CORE value: '' # PROVIDE THE LIB HERE # ONLY LITMUS SUPPORTED - name: LIB value: 'litmus' # provide lib image - name: LIB_IMAGE value: 'litmuschaos/stress-ng:latest' labels: name: node-cpu-hog