@@ -38,11 +38,15 @@ spec:
|
|||||||
template: pod-network-loss
|
template: pod-network-loss
|
||||||
- - name: revert-chaos
|
- - name: revert-chaos
|
||||||
template: revert-chaos
|
template: revert-chaos
|
||||||
|
- name: delete-application
|
||||||
|
template: delete-application
|
||||||
|
- name: delete-loadtest
|
||||||
|
template: delete-loadtest
|
||||||
|
|
||||||
- name: install-application
|
- name: install-application
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=sock-shop","-typeName=resilient", "-timeout=400"]
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=apply","-timeout=400"]
|
||||||
|
|
||||||
- name: install-pod-delete
|
- name: install-pod-delete
|
||||||
inputs:
|
inputs:
|
||||||
@@ -110,7 +114,7 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '15'
|
value: '30'
|
||||||
# Period to wait before and after injection of chaos in sec
|
# Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
@@ -195,7 +199,7 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '60'
|
value: '30'
|
||||||
|
|
||||||
- name: CHAOS_INTERVAL
|
- name: CHAOS_INTERVAL
|
||||||
value: '10'
|
value: '10'
|
||||||
@@ -287,7 +291,7 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '60'
|
value: '30'
|
||||||
- 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
|
||||||
@@ -310,7 +314,7 @@ spec:
|
|||||||
## it defines the sequence of chaos execution for multiple target pods
|
## it defines the sequence of chaos execution for multiple target pods
|
||||||
## supported values: serial, parallel
|
## supported values: serial, parallel
|
||||||
- name: SEQUENCE
|
- name: SEQUENCE
|
||||||
value: 'parallel
|
value: 'parallel'
|
||||||
- name: TARGET_PODS
|
- name: TARGET_PODS
|
||||||
value: ''
|
value: ''
|
||||||
labels:
|
labels:
|
||||||
@@ -550,7 +554,7 @@ spec:
|
|||||||
- name: MEMORY_CONSUMPTION
|
- name: MEMORY_CONSUMPTION
|
||||||
value: '500'
|
value: '500'
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '60' # in seconds
|
value: '30' # in seconds
|
||||||
|
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-checker:latest
|
image: litmuschaos/litmus-checker:latest
|
||||||
@@ -706,13 +710,22 @@ spec:
|
|||||||
value: '/var/run/docker.sock'
|
value: '/var/run/docker.sock'
|
||||||
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"]
|
||||||
|
|
||||||
|
- name: delete-application
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=delete"]
|
||||||
|
|
||||||
|
|
||||||
- name: load-test
|
- name: load-test
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=loadtest"]
|
args: ["-namespace=loadtest"]
|
||||||
|
|
||||||
|
- name: delete-loadtest
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=loadtest","-operation=delete"]
|
||||||
|
|
||||||
- name: revert-chaos
|
- name: revert-chaos
|
||||||
container:
|
container:
|
||||||
|
@@ -42,11 +42,15 @@ spec:
|
|||||||
template: pod-network-loss
|
template: pod-network-loss
|
||||||
- - name: revert-chaos
|
- - name: revert-chaos
|
||||||
template: revert-chaos
|
template: revert-chaos
|
||||||
|
- name: delete-application
|
||||||
|
template: delete-application
|
||||||
|
- name: delete-loadtest
|
||||||
|
template: delete-loadtest
|
||||||
|
|
||||||
- name: install-application
|
- name: install-application
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=sock-shop","-typeName=resilient", "-timeout=400"]
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=apply","-timeout=400"]
|
||||||
|
|
||||||
- name: install-pod-delete
|
- name: install-pod-delete
|
||||||
inputs:
|
inputs:
|
||||||
@@ -69,6 +73,8 @@ spec:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
- "apps"
|
- "apps"
|
||||||
|
- "apps.openshift.io"
|
||||||
|
- "argoproj.io"
|
||||||
- "batch"
|
- "batch"
|
||||||
- "litmuschaos.io"
|
- "litmuschaos.io"
|
||||||
resources:
|
resources:
|
||||||
@@ -76,8 +82,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"
|
||||||
@@ -88,6 +101,7 @@ spec:
|
|||||||
- "patch"
|
- "patch"
|
||||||
- "update"
|
- "update"
|
||||||
- "delete"
|
- "delete"
|
||||||
|
- "deletecollection"
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
@@ -104,19 +118,23 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '15'
|
value: '30'
|
||||||
# Period to wait before and after injection of chaos in sec
|
# Period to wait before and after injection of chaos in sec
|
||||||
- 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:
|
||||||
@@ -148,12 +166,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"
|
||||||
@@ -164,6 +193,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:
|
||||||
@@ -173,29 +203,30 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: ''
|
value: '30'
|
||||||
|
|
||||||
- name: CHAOS_INTERVAL
|
- name: CHAOS_INTERVAL
|
||||||
value: '10'
|
value: '10'
|
||||||
|
|
||||||
## Number of CPU cores to stress
|
## Number of CPU cores to stress
|
||||||
- name: CPU_CORES
|
- name: CPU_CORES
|
||||||
value: '1'
|
value: '1'
|
||||||
|
|
||||||
## Percentage of total pods to target
|
## Percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos in sec
|
## Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
- name: LIB
|
- name: LIB
|
||||||
value: 'litmus'
|
value: 'litmus'
|
||||||
|
## It is used in pumba lib only
|
||||||
- name: TARGET_POD
|
- 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:
|
||||||
@@ -227,11 +258,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"
|
||||||
@@ -243,7 +285,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
|
||||||
@@ -252,30 +296,31 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '30'
|
value: '30'
|
||||||
|
|
||||||
- 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
|
||||||
- name: MEMORY_CONSUMPTION
|
- name: MEMORY_CONSUMPTION
|
||||||
value: '500'
|
value: '500'
|
||||||
|
|
||||||
## percentage of total pods to target
|
## percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos in sec
|
## Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## env var that describes the library used to execute the chaos
|
## env var that describes the library used to execute the chaos
|
||||||
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
||||||
- name: LIB
|
- name: LIB
|
||||||
value: 'litmus'
|
value: 'litmus'
|
||||||
|
- name: LIB_IMAGE
|
||||||
- name: TARGET_POD
|
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
|
||||||
container:
|
container:
|
||||||
@@ -307,11 +352,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"
|
||||||
@@ -335,49 +391,34 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: TARGET_CONTAINER
|
- name: TARGET_CONTAINER
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
- name: LIB_IMAGE
|
||||||
value: 'litmuschaos/go-runner:latest'
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
- name: NETWORK_INTERFACE
|
||||||
value: 'eth0'
|
value: 'eth0'
|
||||||
|
|
||||||
- name: TC_IMAGE
|
- name: TC_IMAGE
|
||||||
value: 'gaiadocker/iproute2'
|
value: 'gaiadocker/iproute2'
|
||||||
|
|
||||||
- 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_PODS
|
||||||
- name: TARGET_POD
|
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
- name: CONTAINER_RUNTIME
|
- name: CONTAINER_RUNTIME
|
||||||
value: 'docker'
|
value: 'docker'
|
||||||
|
- name: DESTINATION_IPS
|
||||||
- name: TARGET_IPS
|
|
||||||
value: ''
|
value: ''
|
||||||
|
- name: DESTINATION_HOSTS
|
||||||
- name: TARGET_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:
|
||||||
name: pod-network-loss
|
name: pod-network-loss
|
||||||
container:
|
container:
|
||||||
@@ -385,77 +426,6 @@ spec:
|
|||||||
command: [sh, -c]
|
command: [sh, -c]
|
||||||
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
||||||
|
|
||||||
- name: pod-network-loss
|
|
||||||
inputs:
|
|
||||||
artifacts:
|
|
||||||
- name: pod-network-loss
|
|
||||||
path: /tmp/chaosengine.yaml
|
|
||||||
raw:
|
|
||||||
data: |
|
|
||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss-chaos
|
|
||||||
namespace: {{workflow.parameters.adminModeNamespace}}
|
|
||||||
spec:
|
|
||||||
appinfo:
|
|
||||||
appns: 'sock-shop'
|
|
||||||
applabel: 'name=user-db'
|
|
||||||
appkind: 'statefulset'
|
|
||||||
jobCleanUpPolicy: retain
|
|
||||||
monitoring: true
|
|
||||||
annotationCheck: 'false'
|
|
||||||
engineState: 'active'
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
chaosServiceAccount: litmus-admin
|
|
||||||
components:
|
|
||||||
runner:
|
|
||||||
imagePullPolicy: Always
|
|
||||||
experiments:
|
|
||||||
- name: pod-network-loss
|
|
||||||
spec:
|
|
||||||
probe:
|
|
||||||
- name: "check-cards-access-url"
|
|
||||||
type: "httpProbe"
|
|
||||||
httpProbe/inputs:
|
|
||||||
url: "http://front-end.sock-shop.svc.cluster.local:80/cards"
|
|
||||||
insecureSkipVerify: false
|
|
||||||
method:
|
|
||||||
get:
|
|
||||||
criteria: "=="
|
|
||||||
responseCode: "200"
|
|
||||||
mode: "Continuous"
|
|
||||||
runProperties:
|
|
||||||
probeTimeout: 2
|
|
||||||
interval: 1
|
|
||||||
retry: 2
|
|
||||||
probePollingInterval: 1
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'litmuschaos/go-runner:latest'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '30'
|
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
|
||||||
value: '100'
|
|
||||||
|
|
||||||
- name: CONTAINER_RUNTIME
|
|
||||||
value: 'docker'
|
|
||||||
|
|
||||||
- name: SOCKET_PATH
|
|
||||||
value: '/var/run/docker.sock'
|
|
||||||
container:
|
|
||||||
image: litmuschaos/litmus-checker:latest
|
|
||||||
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
|
|
||||||
|
|
||||||
- name: pod-cpu-hog
|
- name: pod-cpu-hog
|
||||||
inputs:
|
inputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -515,17 +485,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: CPU_CORES
|
||||||
- name: NODE_CPU_CORE
|
|
||||||
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"]
|
||||||
@@ -589,15 +555,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: '30' # 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"]
|
||||||
@@ -621,7 +583,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'
|
||||||
@@ -665,7 +626,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
|
||||||
@@ -677,11 +638,98 @@ spec:
|
|||||||
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"]
|
||||||
|
|
||||||
|
- name: pod-network-loss
|
||||||
|
inputs:
|
||||||
|
artifacts:
|
||||||
|
- name: pod-network-loss
|
||||||
|
path: /tmp/chaosengine.yaml
|
||||||
|
raw:
|
||||||
|
data: |
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: pod-network-loss-chaos
|
||||||
|
namespace: {{workflow.parameters.adminModeNamespace}}
|
||||||
|
spec:
|
||||||
|
appinfo:
|
||||||
|
appns: 'sock-shop'
|
||||||
|
applabel: 'name=user-db'
|
||||||
|
appkind: 'statefulset'
|
||||||
|
jobCleanUpPolicy: retain
|
||||||
|
monitoring: false
|
||||||
|
annotationCheck: 'false'
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: litmus-admin
|
||||||
|
components:
|
||||||
|
runner:
|
||||||
|
imagePullPolicy: Always
|
||||||
|
experiments:
|
||||||
|
- name: pod-network-loss
|
||||||
|
spec:
|
||||||
|
probe:
|
||||||
|
- name: "check-cards-access-url"
|
||||||
|
type: "httpProbe"
|
||||||
|
httpProbe/inputs:
|
||||||
|
url: "http://front-end.sock-shop.svc.cluster.local:80/cards"
|
||||||
|
insecureSkipVerify: false
|
||||||
|
method:
|
||||||
|
get:
|
||||||
|
criteria: "=="
|
||||||
|
responseCode: "200"
|
||||||
|
mode: "Continuous"
|
||||||
|
runProperties:
|
||||||
|
probeTimeout: 2
|
||||||
|
interval: 1
|
||||||
|
retry: 2
|
||||||
|
probePollingInterval: 1
|
||||||
|
- name: "check-benchmark"
|
||||||
|
type: "cmdProbe"
|
||||||
|
cmdProbe/inputs:
|
||||||
|
command: "curl http://qps-test.sock-shop.svc.cluster.local"
|
||||||
|
comparator:
|
||||||
|
type: "int" # supports: string, int, float
|
||||||
|
criteria: ">=" #supports >=,<=,>,<,==,!= for int and contains,equal,notEqual,matches,notMatches for string values
|
||||||
|
value: "500"
|
||||||
|
source: "inline" # it can be “inline” or any image
|
||||||
|
mode: "Edge"
|
||||||
|
runProperties:
|
||||||
|
probeTimeout: 2
|
||||||
|
interval: 2
|
||||||
|
retry: 1
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
- name: NETWORK_INTERFACE
|
||||||
|
value: 'eth0'
|
||||||
|
|
||||||
|
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
||||||
|
value: '100'
|
||||||
|
- name: CONTAINER_RUNTIME
|
||||||
|
value: 'docker'
|
||||||
|
- name: SOCKET_PATH
|
||||||
|
value: '/var/run/docker.sock'
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-checker:latest
|
||||||
|
args: ["-file=/tmp/chaosengine.yaml","-saveName=/tmp/engine-name"]
|
||||||
|
|
||||||
|
- name: delete-application
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=delete"]
|
||||||
|
|
||||||
- name: load-test
|
- name: load-test
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=loadtest"]
|
args: ["-namespace=loadtest"]
|
||||||
|
|
||||||
|
- name: delete-loadtest
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=loadtest","-operation=delete"]
|
||||||
|
|
||||||
- name: revert-chaos
|
- name: revert-chaos
|
||||||
container:
|
container:
|
||||||
@@ -689,5 +737,5 @@ spec:
|
|||||||
command: [sh, -c]
|
command: [sh, -c]
|
||||||
args:
|
args:
|
||||||
[
|
[
|
||||||
"kubectl delete chaosengine pod-memory-hog-chaos pod-cpu-hog-chaos catalogue-pod-delete-chaos pod-network-loss-chaos -n {{workflow.parameters.adminModeNamespace}}",
|
"kubectl delete chaosengine pod-memory-hog-chaos pod-cpu-hog-chaos catalogue-pod-delete-chaos pod-network-loss-chaos -n {{workflow.parameters.adminModeNamespace}}",
|
||||||
]
|
]
|
@@ -19,7 +19,7 @@ spec:
|
|||||||
- - name: install-application
|
- - name: install-application
|
||||||
template: install-application
|
template: install-application
|
||||||
- name: load-test
|
- name: load-test
|
||||||
template: load-test
|
template: load-test
|
||||||
- - name: install-pod-delete
|
- - name: install-pod-delete
|
||||||
template: install-pod-delete
|
template: install-pod-delete
|
||||||
- name: install-pod-memory-hog
|
- name: install-pod-memory-hog
|
||||||
@@ -38,11 +38,15 @@ spec:
|
|||||||
template: pod-network-loss
|
template: pod-network-loss
|
||||||
- - name: revert-chaos
|
- - name: revert-chaos
|
||||||
template: revert-chaos
|
template: revert-chaos
|
||||||
|
- name: delete-application
|
||||||
|
template: delete-application
|
||||||
|
- name: delete-loadtest
|
||||||
|
template: delete-loadtest
|
||||||
|
|
||||||
- name: install-application
|
- name: install-application
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=sock-shop","-typeName=resilient", "-timeout=400"]
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=apply","-timeout=400"] #for resilient provide type flagName as resilient(-typeName=resilient)
|
||||||
|
|
||||||
- name: install-pod-delete
|
- name: install-pod-delete
|
||||||
inputs:
|
inputs:
|
||||||
@@ -65,6 +69,8 @@ spec:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
- "apps"
|
- "apps"
|
||||||
|
- "apps.openshift.io"
|
||||||
|
- "argoproj.io"
|
||||||
- "batch"
|
- "batch"
|
||||||
- "litmuschaos.io"
|
- "litmuschaos.io"
|
||||||
resources:
|
resources:
|
||||||
@@ -72,8 +78,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 +97,7 @@ spec:
|
|||||||
- "patch"
|
- "patch"
|
||||||
- "update"
|
- "update"
|
||||||
- "delete"
|
- "delete"
|
||||||
|
- "deletecollection"
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
@@ -100,19 +114,23 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '15'
|
value: '30'
|
||||||
# Period to wait before and after injection of chaos in sec
|
# Period to wait before and after injection of chaos in sec
|
||||||
- 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: '10'
|
||||||
|
- 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 +162,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 +189,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,29 +199,30 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: ''
|
value: '30'
|
||||||
|
|
||||||
- name: CHAOS_INTERVAL
|
- name: CHAOS_INTERVAL
|
||||||
value: '10'
|
value: '10'
|
||||||
|
|
||||||
## Number of CPU cores to stress
|
## Number of CPU cores to stress
|
||||||
- name: CPU_CORES
|
- name: CPU_CORES
|
||||||
value: '1'
|
value: '1'
|
||||||
|
|
||||||
## Percentage of total pods to target
|
## Percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos in sec
|
## Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
- name: LIB
|
- name: LIB
|
||||||
value: 'litmus'
|
value: 'litmus'
|
||||||
|
## It is used in pumba lib only
|
||||||
- name: TARGET_POD
|
- 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:
|
||||||
@@ -223,11 +254,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"
|
||||||
@@ -239,7 +281,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
|
||||||
@@ -248,30 +292,31 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '30'
|
value: '30'
|
||||||
|
|
||||||
- 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
|
||||||
- name: MEMORY_CONSUMPTION
|
- name: MEMORY_CONSUMPTION
|
||||||
value: '500'
|
value: '500'
|
||||||
|
|
||||||
## percentage of total pods to target
|
## percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos in sec
|
## Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## env var that describes the library used to execute the chaos
|
## env var that describes the library used to execute the chaos
|
||||||
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
||||||
- name: LIB
|
- name: LIB
|
||||||
value: 'litmus'
|
value: 'litmus'
|
||||||
|
- name: LIB_IMAGE
|
||||||
- name: TARGET_POD
|
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
|
||||||
container:
|
container:
|
||||||
@@ -282,6 +327,101 @@ spec:
|
|||||||
"kubectl apply -f /tmp/pod-memory-hog.yaml -n {{workflow.parameters.adminModeNamespace}}",
|
"kubectl apply -f /tmp/pod-memory-hog.yaml -n {{workflow.parameters.adminModeNamespace}}",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
- name: install-pod-network-loss
|
||||||
|
inputs:
|
||||||
|
artifacts:
|
||||||
|
- name: install-pod-network-loss
|
||||||
|
path: /tmp/pod-network-loss.yaml
|
||||||
|
raw:
|
||||||
|
data: |
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Injects network packet loss on pods belonging to an app deployment
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: pod-network-loss
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "apps"
|
||||||
|
- "apps.openshift.io"
|
||||||
|
- "argoproj.io"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/log"
|
||||||
|
- "replicationcontrollers"
|
||||||
|
- "deployments"
|
||||||
|
- "statefulsets"
|
||||||
|
- "daemonsets"
|
||||||
|
- "replicasets"
|
||||||
|
- "deploymentconfigs"
|
||||||
|
- "rollouts"
|
||||||
|
- "pods/exec"
|
||||||
|
- "events"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
- "deletecollection"
|
||||||
|
image: "litmuschaos/go-runner:latest"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ./experiments -name pod-network-loss
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
- name: NETWORK_INTERFACE
|
||||||
|
value: 'eth0'
|
||||||
|
- name: TC_IMAGE
|
||||||
|
value: 'gaiadocker/iproute2'
|
||||||
|
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
||||||
|
value: '100' #in PERCENTAGE
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30' # in seconds
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
- name: TARGET_PODS
|
||||||
|
value: ''
|
||||||
|
- name: CONTAINER_RUNTIME
|
||||||
|
value: 'docker'
|
||||||
|
- name: DESTINATION_IPS
|
||||||
|
value: ''
|
||||||
|
- name: DESTINATION_HOSTS
|
||||||
|
value: ''
|
||||||
|
- name: SOCKET_PATH
|
||||||
|
value: '/var/run/docker.sock'
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
labels:
|
||||||
|
name: pod-network-loss
|
||||||
|
container:
|
||||||
|
image: lachlanevenson/k8s-kubectl
|
||||||
|
command: [sh, -c]
|
||||||
|
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
||||||
|
|
||||||
- name: pod-cpu-hog
|
- name: pod-cpu-hog
|
||||||
inputs:
|
inputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -339,17 +479,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: CPU_CORES
|
||||||
- name: NODE_CPU_CORE
|
|
||||||
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"]
|
||||||
@@ -411,15 +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: '30' # 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"]
|
||||||
@@ -443,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'
|
||||||
@@ -485,7 +616,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
|
||||||
@@ -498,105 +629,6 @@ spec:
|
|||||||
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"]
|
||||||
|
|
||||||
- name: install-pod-network-loss
|
|
||||||
inputs:
|
|
||||||
artifacts:
|
|
||||||
- name: install-pod-network-loss
|
|
||||||
path: /tmp/pod-network-loss.yaml
|
|
||||||
raw:
|
|
||||||
data: |
|
|
||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Injects network packet loss on pods belonging to an app deployment
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Namespaced
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- "deletecollection"
|
|
||||||
image: "litmuschaos/go-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ./experiments -name pod-network-loss
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
|
|
||||||
env:
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'litmuschaos/go-runner:latest'
|
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: TC_IMAGE
|
|
||||||
value: 'gaiadocker/iproute2'
|
|
||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
|
||||||
value: '100' #in PERCENTAGE
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
||||||
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
|
|
||||||
- name: PODS_AFFECTED_PERC
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: TARGET_POD
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: CONTAINER_RUNTIME
|
|
||||||
value: 'docker'
|
|
||||||
|
|
||||||
- name: TARGET_IPS
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: TARGET_HOSTS
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: SOCKET_PATH
|
|
||||||
value: '/run/containerd/containerd.sock'
|
|
||||||
|
|
||||||
- name: SEQUENCE
|
|
||||||
value: 'parallel'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: pod-network-loss
|
|
||||||
container:
|
|
||||||
image: lachlanevenson/k8s-kubectl
|
|
||||||
command: [sh, -c]
|
|
||||||
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
|
||||||
|
|
||||||
- name: pod-network-loss
|
- name: pod-network-loss
|
||||||
inputs:
|
inputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -642,14 +674,21 @@ spec:
|
|||||||
interval: 1
|
interval: 1
|
||||||
retry: 2
|
retry: 2
|
||||||
probePollingInterval: 1
|
probePollingInterval: 1
|
||||||
|
- name: "check-probe-success"
|
||||||
|
type: "promProbe"
|
||||||
|
promProbe/inputs:
|
||||||
|
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090"
|
||||||
|
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
|
||||||
|
comparator:
|
||||||
|
criteria: ">=" #supports >=,<=,>,<,==,!= comparision
|
||||||
|
value: "500"
|
||||||
|
mode: "Edge"
|
||||||
|
runProperties:
|
||||||
|
probeTimeout: 5
|
||||||
|
interval: 5
|
||||||
|
retry: 1
|
||||||
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'
|
||||||
|
|
||||||
@@ -658,21 +697,28 @@ spec:
|
|||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
||||||
value: '100'
|
value: '100'
|
||||||
|
|
||||||
- name: CONTAINER_RUNTIME
|
- name: CONTAINER_RUNTIME
|
||||||
value: 'docker'
|
value: 'docker'
|
||||||
|
|
||||||
- name: SOCKET_PATH
|
- name: SOCKET_PATH
|
||||||
value: '/var/run/docker.sock'
|
value: '/var/run/docker.sock'
|
||||||
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"]
|
||||||
|
|
||||||
|
|
||||||
|
- name: delete-application
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=delete"]
|
||||||
|
|
||||||
- name: load-test
|
- name: load-test
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=loadtest"]
|
args: ["-namespace=loadtest"]
|
||||||
|
|
||||||
|
- name: delete-loadtest
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=loadtest","-operation=delete"]
|
||||||
|
|
||||||
- name: revert-chaos
|
- name: revert-chaos
|
||||||
container:
|
container:
|
||||||
|
@@ -23,7 +23,7 @@ spec:
|
|||||||
- - name: install-application
|
- - name: install-application
|
||||||
template: install-application
|
template: install-application
|
||||||
- name: load-test
|
- name: load-test
|
||||||
template: load-test
|
template: load-test
|
||||||
- - name: install-pod-delete
|
- - name: install-pod-delete
|
||||||
template: install-pod-delete
|
template: install-pod-delete
|
||||||
- name: install-pod-memory-hog
|
- name: install-pod-memory-hog
|
||||||
@@ -36,17 +36,23 @@ spec:
|
|||||||
template: pod-memory-hog
|
template: pod-memory-hog
|
||||||
- name: pod-cpu-hog
|
- name: pod-cpu-hog
|
||||||
template: pod-cpu-hog
|
template: pod-cpu-hog
|
||||||
|
- name: pod-network-loss
|
||||||
|
template: pod-network-loss
|
||||||
- - name: pod-delete
|
- - name: pod-delete
|
||||||
template: pod-delete
|
template: pod-delete
|
||||||
- - name: pod-network-loss
|
- - name: pod-network-loss
|
||||||
template: pod-network-loss
|
template: pod-network-loss
|
||||||
- - name: revert-chaos
|
- - name: revert-chaos
|
||||||
template: revert-chaos
|
template: revert-chaos
|
||||||
|
- name: delete-application
|
||||||
|
template: delete-application
|
||||||
|
- name: delete-loadtest
|
||||||
|
template: delete-loadtest
|
||||||
|
|
||||||
- name: install-application
|
- name: install-application
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=sock-shop","-typeName=resilient", "-timeout=400"]
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=apply","-timeout=400"] #for resilient provide type flagName as resilient(-typeName=resilient)
|
||||||
|
|
||||||
- name: install-pod-delete
|
- name: install-pod-delete
|
||||||
inputs:
|
inputs:
|
||||||
@@ -69,6 +75,8 @@ spec:
|
|||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
- "apps"
|
- "apps"
|
||||||
|
- "apps.openshift.io"
|
||||||
|
- "argoproj.io"
|
||||||
- "batch"
|
- "batch"
|
||||||
- "litmuschaos.io"
|
- "litmuschaos.io"
|
||||||
resources:
|
resources:
|
||||||
@@ -76,8 +84,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"
|
||||||
@@ -88,6 +103,7 @@ spec:
|
|||||||
- "patch"
|
- "patch"
|
||||||
- "update"
|
- "update"
|
||||||
- "delete"
|
- "delete"
|
||||||
|
- "deletecollection"
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
@@ -104,19 +120,23 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '15'
|
value: '30'
|
||||||
# Period to wait before and after injection of chaos in sec
|
# Period to wait before and after injection of chaos in sec
|
||||||
- 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:
|
||||||
@@ -148,12 +168,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"
|
||||||
@@ -164,6 +195,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:
|
||||||
@@ -173,29 +205,30 @@ spec:
|
|||||||
- /bin/bash
|
- /bin/bash
|
||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: ''
|
value: '30'
|
||||||
|
|
||||||
- name: CHAOS_INTERVAL
|
- name: CHAOS_INTERVAL
|
||||||
value: '10'
|
value: '10'
|
||||||
|
|
||||||
## Number of CPU cores to stress
|
## Number of CPU cores to stress
|
||||||
- name: CPU_CORES
|
- name: CPU_CORES
|
||||||
value: '1'
|
value: '1'
|
||||||
|
|
||||||
## Percentage of total pods to target
|
## Percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos in sec
|
## Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
- name: LIB
|
- name: LIB
|
||||||
value: 'litmus'
|
value: 'litmus'
|
||||||
|
## It is used in pumba lib only
|
||||||
- name: TARGET_POD
|
- 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:
|
||||||
@@ -227,11 +260,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"
|
||||||
@@ -243,7 +287,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
|
||||||
@@ -252,30 +298,31 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: TOTAL_CHAOS_DURATION
|
- name: TOTAL_CHAOS_DURATION
|
||||||
value: '30'
|
value: '30'
|
||||||
|
|
||||||
- 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
|
||||||
- name: MEMORY_CONSUMPTION
|
- name: MEMORY_CONSUMPTION
|
||||||
value: '500'
|
value: '500'
|
||||||
|
|
||||||
## percentage of total pods to target
|
## percentage of total pods to target
|
||||||
- name: PODS_AFFECTED_PERC
|
- name: PODS_AFFECTED_PERC
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos in sec
|
## Period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: ''
|
value: ''
|
||||||
|
|
||||||
## env var that describes the library used to execute the chaos
|
## env var that describes the library used to execute the chaos
|
||||||
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
||||||
- name: LIB
|
- name: LIB
|
||||||
value: 'litmus'
|
value: 'litmus'
|
||||||
|
- name: LIB_IMAGE
|
||||||
- name: TARGET_POD
|
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
|
||||||
container:
|
container:
|
||||||
@@ -286,6 +333,101 @@ spec:
|
|||||||
"kubectl apply -f /tmp/pod-memory-hog.yaml -n {{workflow.parameters.adminModeNamespace}}",
|
"kubectl apply -f /tmp/pod-memory-hog.yaml -n {{workflow.parameters.adminModeNamespace}}",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
- name: install-pod-network-loss
|
||||||
|
inputs:
|
||||||
|
artifacts:
|
||||||
|
- name: install-pod-network-loss
|
||||||
|
path: /tmp/pod-network-loss.yaml
|
||||||
|
raw:
|
||||||
|
data: |
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Injects network packet loss on pods belonging to an app deployment
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: pod-network-loss
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "apps"
|
||||||
|
- "apps.openshift.io"
|
||||||
|
- "argoproj.io"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/log"
|
||||||
|
- "replicationcontrollers"
|
||||||
|
- "deployments"
|
||||||
|
- "statefulsets"
|
||||||
|
- "daemonsets"
|
||||||
|
- "replicasets"
|
||||||
|
- "deploymentconfigs"
|
||||||
|
- "rollouts"
|
||||||
|
- "pods/exec"
|
||||||
|
- "events"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
- "deletecollection"
|
||||||
|
image: "litmuschaos/go-runner:latest"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ./experiments -name pod-network-loss
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
- name: NETWORK_INTERFACE
|
||||||
|
value: 'eth0'
|
||||||
|
- name: TC_IMAGE
|
||||||
|
value: 'gaiadocker/iproute2'
|
||||||
|
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
||||||
|
value: '100' #in PERCENTAGE
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30' # in seconds
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
- name: TARGET_PODS
|
||||||
|
value: ''
|
||||||
|
- name: CONTAINER_RUNTIME
|
||||||
|
value: 'docker'
|
||||||
|
- name: DESTINATION_IPS
|
||||||
|
value: ''
|
||||||
|
- name: DESTINATION_HOSTS
|
||||||
|
value: ''
|
||||||
|
- name: SOCKET_PATH
|
||||||
|
value: '/var/run/docker.sock'
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
labels:
|
||||||
|
name: pod-network-loss
|
||||||
|
container:
|
||||||
|
image: lachlanevenson/k8s-kubectl
|
||||||
|
command: [sh, -c]
|
||||||
|
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
||||||
|
|
||||||
- name: pod-cpu-hog
|
- name: pod-cpu-hog
|
||||||
inputs:
|
inputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -343,22 +485,17 @@ 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: CPU_CORES
|
||||||
- name: NODE_CPU_CORE
|
|
||||||
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"]
|
||||||
|
|
||||||
|
|
||||||
- name: pod-memory-hog
|
- name: pod-memory-hog
|
||||||
inputs:
|
inputs:
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -416,15 +553,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: '30' # 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"]
|
||||||
@@ -448,7 +581,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'
|
||||||
@@ -490,7 +622,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
|
||||||
@@ -502,105 +634,6 @@ spec:
|
|||||||
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"]
|
||||||
|
|
||||||
- name: install-pod-network-loss
|
|
||||||
inputs:
|
|
||||||
artifacts:
|
|
||||||
- name: install-pod-network-loss
|
|
||||||
path: /tmp/pod-network-loss.yaml
|
|
||||||
raw:
|
|
||||||
data: |
|
|
||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Injects network packet loss on pods belonging to an app deployment
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Namespaced
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- "deletecollection"
|
|
||||||
image: "litmuschaos/go-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ./experiments -name pod-network-loss
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
|
|
||||||
env:
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'litmuschaos/go-runner:latest'
|
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: TC_IMAGE
|
|
||||||
value: 'gaiadocker/iproute2'
|
|
||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
|
||||||
value: '100' #in PERCENTAGE
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
||||||
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
|
|
||||||
- name: PODS_AFFECTED_PERC
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: TARGET_POD
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: CONTAINER_RUNTIME
|
|
||||||
value: 'docker'
|
|
||||||
|
|
||||||
- name: TARGET_IPS
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: TARGET_HOSTS
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: SOCKET_PATH
|
|
||||||
value: '/run/containerd/containerd.sock'
|
|
||||||
|
|
||||||
- name: SEQUENCE
|
|
||||||
value: 'parallel'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: pod-network-loss
|
|
||||||
container:
|
|
||||||
image: lachlanevenson/k8s-kubectl
|
|
||||||
command: [sh, -c]
|
|
||||||
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
|
||||||
|
|
||||||
- name: pod-network-loss
|
- name: pod-network-loss
|
||||||
inputs:
|
inputs:
|
||||||
@@ -647,14 +680,21 @@ spec:
|
|||||||
interval: 1
|
interval: 1
|
||||||
retry: 2
|
retry: 2
|
||||||
probePollingInterval: 1
|
probePollingInterval: 1
|
||||||
|
- name: "check-probe-success"
|
||||||
|
type: "promProbe"
|
||||||
|
promProbe/inputs:
|
||||||
|
endpoint: "http://prometheus.monitoring.svc.cluster.local:9090"
|
||||||
|
query: "sum(rate(request_duration_seconds_count{job='sock-shop/front-end',route='/',status_code='200'}[20s]))*100"
|
||||||
|
comparator:
|
||||||
|
criteria: ">=" #supports >=,<=,>,<,==,!= comparision
|
||||||
|
value: "500"
|
||||||
|
mode: "Edge"
|
||||||
|
runProperties:
|
||||||
|
probeTimeout: 5
|
||||||
|
interval: 5
|
||||||
|
retry: 1
|
||||||
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'
|
||||||
|
|
||||||
@@ -663,21 +703,28 @@ spec:
|
|||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
||||||
value: '100'
|
value: '100'
|
||||||
|
|
||||||
- name: CONTAINER_RUNTIME
|
- name: CONTAINER_RUNTIME
|
||||||
value: 'docker'
|
value: 'docker'
|
||||||
|
|
||||||
- name: SOCKET_PATH
|
- name: SOCKET_PATH
|
||||||
value: '/var/run/docker.sock'
|
value: '/var/run/docker.sock'
|
||||||
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"]
|
||||||
|
|
||||||
|
- name: delete-application
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=sock-shop","-typeName=resilient","-operation=delete"]
|
||||||
|
|
||||||
- name: load-test
|
- name: load-test
|
||||||
container:
|
container:
|
||||||
image: litmuschaos/litmus-app-deployer:latest
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
args: ["-namespace=loadtest"]
|
args: ["-namespace=loadtest"]
|
||||||
|
|
||||||
|
- name: delete-loadtest
|
||||||
|
container:
|
||||||
|
image: litmuschaos/litmus-app-deployer:latest
|
||||||
|
args: ["-namespace=loadtest","-operation=delete"]
|
||||||
|
|
||||||
- name: revert-chaos
|
- name: revert-chaos
|
||||||
container:
|
container:
|
||||||
|
Reference in New Issue
Block a user