48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
apiVersion: litmuschaos.io/v1alpha1
|
|
kind: ChaosEngine
|
|
metadata:
|
|
name: nginx-chaos
|
|
namespace: default
|
|
spec:
|
|
# It can be active/stop
|
|
engineState: 'active'
|
|
appinfo:
|
|
appns: 'default'
|
|
# FYI, To see app label, apply kubectl get pods --show-labels
|
|
applabel: 'app=nginx'
|
|
appkind: 'deployment'
|
|
chaosServiceAccount: pod-http-reset-peer-sa
|
|
experiments:
|
|
- name: pod-http-reset-peer
|
|
spec:
|
|
components:
|
|
env:
|
|
# set chaos duration (in sec) as desired
|
|
- name: TOTAL_CHAOS_DURATION
|
|
value: '60' # in seconds
|
|
|
|
# reset timeout specifies after how much duration to reset the connection
|
|
- name: RESET_TIMEOUT
|
|
value: '0' #in ms
|
|
|
|
# port of the target service
|
|
- name: TARGET_SERVICE_PORT
|
|
value: "80"
|
|
|
|
- name: TARGET_PODS
|
|
value: ''
|
|
|
|
# provide the name of container runtime
|
|
# for litmus LIB, it supports docker, containerd, crio
|
|
# for pumba LIB, it supports docker only
|
|
- name: CONTAINER_RUNTIME
|
|
value: 'containerd'
|
|
|
|
# provide the socket file path
|
|
- name: SOCKET_PATH
|
|
value: '/run/containerd/containerd.sock'
|
|
|
|
## percentage of total pods to target
|
|
- name: PODS_AFFECTED_PERC
|
|
value: ''
|
|
|