update installation of experiment (#419)
Signed-off-by: oumkale <oum.kale@mayadata.io>
This commit is contained in:
committed by
GitHub
parent
7d4f722e19
commit
df11ea13fe
@@ -18,16 +18,10 @@ spec:
|
||||
steps:
|
||||
- - name: install-application
|
||||
template: install-application
|
||||
- - name: install-chaos-experiments
|
||||
template: install-chaos-experiments
|
||||
- name: load-test
|
||||
template: load-test
|
||||
- - name: install-pod-delete
|
||||
template: install-pod-delete
|
||||
- name: install-pod-memory-hog
|
||||
template: install-pod-memory-hog
|
||||
- name: install-pod-cpu-hog
|
||||
template: install-pod-cpu-hog
|
||||
- name: install-pod-network-loss
|
||||
template: install-pod-network-loss
|
||||
- - name: pod-memory-hog
|
||||
template: pod-memory-hog
|
||||
- name: pod-cpu-hog
|
||||
@@ -38,8 +32,8 @@ spec:
|
||||
template: pod-network-loss
|
||||
- - name: revert-chaos
|
||||
template: revert-chaos
|
||||
- name: delete-application
|
||||
template: delete-application
|
||||
# - name: delete-application
|
||||
# template: delete-application
|
||||
- name: delete-loadtest
|
||||
template: delete-loadtest
|
||||
|
||||
@@ -48,380 +42,14 @@ spec:
|
||||
image: litmuschaos/litmus-app-deployer:latest
|
||||
args: ["-namespace=sock-shop","-typeName=resilient","-operation=apply","-timeout=400"]
|
||||
|
||||
- name: install-pod-delete
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: install-pod-delete
|
||||
path: /tmp/pod-delete.yaml
|
||||
raw:
|
||||
data: |
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-delete
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "apps"
|
||||
- "apps.openshift.io"
|
||||
- "argoproj.io"
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "deployments"
|
||||
- "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"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs:
|
||||
- "get"
|
||||
- "list"
|
||||
image: "litmuschaos/go-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name pod-delete
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
# Period to wait before and after injection of chaos in sec
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
# provide the kill count
|
||||
- name: FORCE
|
||||
value: 'true'
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '5'
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
- name: TARGET_PODS
|
||||
value: ''
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
labels:
|
||||
name: pod-delete
|
||||
- name: install-chaos-experiments
|
||||
container:
|
||||
image: alpine/k8s:1.18.2
|
||||
command: [sh, -c]
|
||||
args:
|
||||
[
|
||||
"kubectl apply -f /tmp/pod-delete.yaml -n {{workflow.parameters.adminModeNamespace}} | sleep 5",
|
||||
]
|
||||
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
|
||||
{{workflow.parameters.adminModeNamespace}} | sleep 30"
|
||||
|
||||
- name: install-pod-cpu-hog
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: install-pod-cpu-hog
|
||||
path: /tmp/pod-cpu-hog.yaml
|
||||
raw:
|
||||
data: |
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Injects cpu consumption on pods belonging to an app deployment
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-cpu-hog
|
||||
spec:
|
||||
definition:
|
||||
scope: Namespaced
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "batch"
|
||||
- "apps"
|
||||
- "apps.openshift.io"
|
||||
- "argoproj.io"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "pods/log"
|
||||
- "events"
|
||||
- "replicationcontrollers"
|
||||
- "deployments"
|
||||
- "statefulsets"
|
||||
- "daemonsets"
|
||||
- "replicasets"
|
||||
- "deploymentconfigs"
|
||||
- "rollouts"
|
||||
- "pods/exec"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
- "deletecollection"
|
||||
image: "litmuschaos/go-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name pod-cpu-hog
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '10'
|
||||
## Number of CPU cores to stress
|
||||
- name: CPU_CORES
|
||||
value: '1'
|
||||
## Percentage of total pods to target
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
||||
## Period to wait before and after injection of chaos in sec
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
## 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: ''
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
labels:
|
||||
name: pod-cpu-hog
|
||||
container:
|
||||
image: alpine/k8s:1.18.2
|
||||
command: [sh, -c]
|
||||
args:
|
||||
[
|
||||
"kubectl apply -f /tmp/pod-cpu-hog.yaml -n {{workflow.parameters.adminModeNamespace}}",
|
||||
]
|
||||
|
||||
- name: install-pod-memory-hog
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: install-pod-memory-hog
|
||||
path: /tmp/pod-memory-hog.yaml
|
||||
raw:
|
||||
data: |
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Injects memory consumption on pods belonging to an app deployment
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-memory-hog
|
||||
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-memory-hog
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '10'
|
||||
## enter the amount of memory in megabytes to be consumed by the application pod
|
||||
- name: MEMORY_CONSUMPTION
|
||||
value: '500'
|
||||
## percentage of total pods to target
|
||||
- name: PODS_AFFECTED_PERC
|
||||
value: ''
|
||||
## Period to wait before and after injection of chaos in sec
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
## env var that describes the library used to execute the chaos
|
||||
## default: litmus. Supported values: litmus, powerfulseal, chaoskube
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
- 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: ''
|
||||
labels:
|
||||
name: pod-memory-hog
|
||||
container:
|
||||
image: alpine/k8s:1.18.2
|
||||
command: [sh, -c]
|
||||
args:
|
||||
[
|
||||
"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: alpine/k8s:1.18.2
|
||||
command: [sh, -c]
|
||||
args: [ "kubectl apply -f /tmp/pod-network-loss.yaml -n {{workflow.parameters.adminModeNamespace}}",]
|
||||
|
||||
- name: pod-cpu-hog
|
||||
inputs:
|
||||
artifacts:
|
||||
|
Reference in New Issue
Block a user