Signed-off-by: oumkale <oum.kale@mayadata.io>
This commit is contained in:
oumkale
2021-02-17 18:02:11 +05:30
parent dfb9587f8e
commit 122d106026

View File

@@ -65,6 +65,8 @@ spec:
- apiGroups: - apiGroups:
- "" - ""
- "apps" - "apps"
- "apps.openshift.io"
- "argoproj.io"
- "batch" - "batch"
- "litmuschaos.io" - "litmuschaos.io"
resources: resources:
@@ -72,8 +74,15 @@ spec:
- "jobs" - "jobs"
- "pods" - "pods"
- "pods/log" - "pods/log"
- "replicationcontrollers"
- "deployments"
- "statefulsets"
- "daemonsets"
- "replicasets"
- "deploymentconfigs"
- "rollouts"
- "pods/exec"
- "events" - "events"
- "configmaps"
- "chaosengines" - "chaosengines"
- "chaosexperiments" - "chaosexperiments"
- "chaosresults" - "chaosresults"
@@ -84,6 +93,7 @@ spec:
- "patch" - "patch"
- "update" - "update"
- "delete" - "delete"
- "deletecollection"
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
@@ -105,14 +115,18 @@ spec:
- name: RAMP_TIME - name: RAMP_TIME
value: '' value: ''
# provide the kill count # provide the kill count
- name: KILL_COUNT
value: ''
- name: FORCE - name: FORCE
value: 'true' value: 'true'
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '5' value: '5'
- name: PODS_AFFECTED_PERC
value: ''
- name: LIB - name: LIB
value: 'litmus' value: 'litmus'
- name: TARGET_PODS
value: ''
- name: SEQUENCE
value: 'parallel'
labels: labels:
name: pod-delete name: pod-delete
container: container:
@@ -144,12 +158,23 @@ spec:
- apiGroups: - apiGroups:
- "" - ""
- "batch" - "batch"
- "apps"
- "apps.openshift.io"
- "argoproj.io"
- "litmuschaos.io" - "litmuschaos.io"
resources: resources:
- "jobs" - "jobs"
- "pods" - "pods"
- "pods/log" - "pods/log"
- "events" - "events"
- "replicationcontrollers"
- "deployments"
- "statefulsets"
- "daemonsets"
- "replicasets"
- "deploymentconfigs"
- "rollouts"
- "pods/exec"
- "chaosengines" - "chaosengines"
- "chaosexperiments" - "chaosexperiments"
- "chaosresults" - "chaosresults"
@@ -160,6 +185,7 @@ spec:
- "patch" - "patch"
- "update" - "update"
- "delete" - "delete"
- "deletecollection"
image: "litmuschaos/go-runner:latest" image: "litmuschaos/go-runner:latest"
imagePullPolicy: Always imagePullPolicy: Always
args: args:
@@ -169,7 +195,7 @@ spec:
- /bin/bash - /bin/bash
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '' value: '60'
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '10' value: '10'
@@ -184,9 +210,15 @@ spec:
value: '' value: ''
- name: LIB - name: LIB
value: 'litmus' value: 'litmus'
- name: TARGET_POD ## It is used in pumba lib only
- name: LIB_IMAGE
value: 'litmuschaos/go-runner:latest'
- name: SOCKET_PATH
value: '/var/run/docker.sock'
- name: TARGET_PODS
value: '' value: ''
- name: SEQUENCE
value: 'parallel'
labels: labels:
name: pod-cpu-hog name: pod-cpu-hog
container: container:
@@ -218,11 +250,22 @@ spec:
- apiGroups: - apiGroups:
- "" - ""
- "batch" - "batch"
- "apps"
- "apps.openshift.io"
- "argoproj.io"
- "litmuschaos.io" - "litmuschaos.io"
resources: resources:
- "jobs" - "jobs"
- "pods" - "pods"
- "pods/log" - "pods/log"
- "replicationcontrollers"
- "deployments"
- "statefulsets"
- "daemonsets"
- "replicasets"
- "deploymentconfigs"
- "rollouts"
- "pods/exec"
- "events" - "events"
- "chaosengines" - "chaosengines"
- "chaosexperiments" - "chaosexperiments"
@@ -234,7 +277,9 @@ spec:
- "patch" - "patch"
- "update" - "update"
- "delete" - "delete"
- "deletecollection"
image: "litmuschaos/go-runner:latest" image: "litmuschaos/go-runner:latest"
imagePullPolicy: Always
args: args:
- -c - -c
- ./experiments -name pod-memory-hog - ./experiments -name pod-memory-hog
@@ -242,7 +287,7 @@ spec:
- /bin/bash - /bin/bash
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '60'
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
value: '10' value: '10'
## enter the amount of memory in megabytes to be consumed by the application pod ## enter the amount of memory in megabytes to be consumed by the application pod
@@ -258,7 +303,15 @@ spec:
## default: litmus. Supported values: litmus, powerfulseal, chaoskube ## default: litmus. Supported values: litmus, powerfulseal, chaoskube
- name: LIB - name: LIB
value: 'litmus' value: 'litmus'
- name: TARGET_POD - name: LIB_IMAGE
value: 'litmuschaos/go-runner:latest'
- name: SOCKET_PATH
value: '/var/run/docker.sock'
## it defines the sequence of chaos execution for multiple target pods
## supported values: serial, parallel
- name: SEQUENCE
value: 'parallel
- name: TARGET_PODS
value: '' value: ''
labels: labels:
name: pod-memory-hog name: pod-memory-hog
@@ -291,11 +344,22 @@ spec:
- apiGroups: - apiGroups:
- "" - ""
- "batch" - "batch"
- "apps"
- "apps.openshift.io"
- "argoproj.io"
- "litmuschaos.io" - "litmuschaos.io"
resources: resources:
- "jobs" - "jobs"
- "pods" - "pods"
- "pods/log" - "pods/log"
- "replicationcontrollers"
- "deployments"
- "statefulsets"
- "daemonsets"
- "replicasets"
- "deploymentconfigs"
- "rollouts"
- "pods/exec"
- "events" - "events"
- "chaosengines" - "chaosengines"
- "chaosexperiments" - "chaosexperiments"
@@ -328,23 +392,23 @@ spec:
- name: NETWORK_PACKET_LOSS_PERCENTAGE - name: NETWORK_PACKET_LOSS_PERCENTAGE
value: '100' #in PERCENTAGE value: '100' #in PERCENTAGE
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '60' # in seconds value: '30' # in seconds
- name: RAMP_TIME - name: RAMP_TIME
value: '' value: ''
- name: LIB - name: LIB
value: 'litmus' value: 'litmus'
- name: PODS_AFFECTED_PERC - name: PODS_AFFECTED_PERC
value: '' value: ''
- name: TARGET_POD - name: TARGET_PODS
value: '' value: ''
- name: CONTAINER_RUNTIME - name: CONTAINER_RUNTIME
value: 'docker' value: 'docker'
- name: TARGET_IPS - name: DESTINATION_IPS
value: '' value: ''
- name: TARGET_HOSTS - name: DESTINATION_HOSTS
value: '' value: ''
- name: SOCKET_PATH - name: SOCKET_PATH
value: '/run/containerd/containerd.sock' value: '/var/run/docker.sock'
- name: SEQUENCE - name: SEQUENCE
value: 'parallel' value: 'parallel'
labels: labels:
@@ -413,14 +477,13 @@ spec:
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TARGET_CONTAINER #number of cpu cores to be consumed
value: '' #verify the resources the app has been launched with
- name: NODE_CPU_CORE - name: CPU_CORES
value: '1' value: '1'
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '' # in seconds value: '30' # in seconds
- name: CHAOS_KILL_COMMAND
value: "kill -9 $(ps afx | grep \"[md5sum] /dev/zero\" | awk '{print$1}' | tr '\n' ' ')"
container: container:
image: litmuschaos/litmus-checker:latest image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"] args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
@@ -484,14 +547,11 @@ spec:
components: components:
experimentImage: "litmuschaos/go-runner:latest" experimentImage: "litmuschaos/go-runner:latest"
env: env:
- name: TARGET_CONTAINER
value: ''
- name: MEMORY_CONSUMPTION - name: MEMORY_CONSUMPTION
value: '500' value: '500'
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '60' # in seconds value: '60' # in seconds
- name: CHAOS_KILL_COMMAND
value: "kill -9 $(ps afx | grep \"[dd] if /dev/zero\" | awk '{print $1}' | tr '\n' ' ')"
container: container:
image: litmuschaos/litmus-checker:latest image: litmuschaos/litmus-checker:latest
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"] args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
@@ -515,7 +575,6 @@ spec:
appkind: 'deployment' appkind: 'deployment'
annotationCheck: 'false' annotationCheck: 'false'
engineState: 'active' engineState: 'active'
auxiliaryAppInfo: ''
chaosServiceAccount: litmus-admin chaosServiceAccount: litmus-admin
monitoring: true monitoring: true
jobCleanUpPolicy: 'retain' jobCleanUpPolicy: 'retain'
@@ -559,7 +618,7 @@ spec:
components: components:
env: env:
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '10' value: '30'
# set chaos interval (in sec) as desired # set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL - name: CHAOS_INTERVAL
@@ -590,10 +649,9 @@ spec:
applabel: 'name=user-db' applabel: 'name=user-db'
appkind: 'statefulset' appkind: 'statefulset'
jobCleanUpPolicy: retain jobCleanUpPolicy: retain
monitoring: true monitoring: false
annotationCheck: 'false' annotationCheck: 'false'
engineState: 'active' engineState: 'active'
auxiliaryAppInfo: ''
chaosServiceAccount: litmus-admin chaosServiceAccount: litmus-admin
components: components:
runner: runner:
@@ -634,10 +692,6 @@ spec:
initialDelaySeconds: 2 initialDelaySeconds: 2
components: components:
env: env:
- name: TARGET_CONTAINER
value: ''
- name: LIB_IMAGE
value: 'litmuschaos/go-runner:latest'
- name: TOTAL_CHAOS_DURATION - name: TOTAL_CHAOS_DURATION
value: '30' value: '30'