Files
litmus-hub/charts/generic/node-cpu-hog/experiment.yaml
Shubham Chaudhary 6ced128ee5 chore(permissions): sync the experiment and rbac permissions (#406)
* chore(permissions): sync the experiment and rbac permissions

Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io>

* Add "statefulsets" in pod autoscaler permissions

Signed-off-by: udit <udit.gaurav@mayadata.io>

Co-authored-by: udit <udit.gaurav@mayadata.io>
2021-01-04 14:26:45 +05:30

93 lines
2.1 KiB
YAML

apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Give a cpu spike on a node belonging to a deployment
kind: ChaosExperiment
metadata:
name: node-cpu-hog
labels:
name: node-cpu-hog
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: chaosexperiment
app.kubernetes.io/version: latest
spec:
definition:
scope: Cluster
permissions:
- apiGroups:
- ""
- "batch"
- "litmuschaos.io"
resources:
- "jobs"
- "pods"
- "pods/log"
- "pods/exec"
- "events"
- "chaosengines"
- "chaosexperiments"
- "chaosresults"
verbs:
- "create"
- "list"
- "get"
- "patch"
- "update"
- "delete"
- "deletecollection"
- apiGroups:
- ""
resources:
- "nodes"
verbs:
- "get"
- "list"
image: "litmuschaos/go-runner:latest"
imagePullPolicy: Always
args:
- -c
- ./experiments -name node-cpu-hog
command:
- /bin/bash
env:
- 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: ''
# ENTER THE COMMA SEPARATED TARGET NODES NAME
- name: TARGET_NODES
value: ''
# PROVIDE THE LIB HERE
# ONLY LITMUS SUPPORTED
- name: LIB
value: 'litmus'
# provide lib image
- name: LIB_IMAGE
value: 'litmuschaos/go-runner:latest'
## percentage of total nodes to target
- name: NODES_AFFECTED_PERC
value: ''
## it defines the sequence of chaos execution for multiple target nodes
## supported values: serial, parallel
- name: SEQUENCE
value: 'parallel'
labels:
name: node-cpu-hog
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: experiment-job
app.kubernetes.io/version: latest