Engine Specification¶
It embeds the ChaosEngine as a template inside schedule CR. Which contains the chaosexperiment and target application details.
View the engine details
Field | .spec.engineTemplateSpec |
---|---|
Description | Flag to control chaosengine to be formed |
Type | Mandatory |
Range | n/a |
Default | n/a |
Notes | The engineTemplateSpec is the ChaosEngineSpec of ChaosEngine that is to be formed. |
Engine Specification¶
Specify the chaosengine details at spec.engineTemplateSpec
inside schedule CR
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosSchedule
metadata:
name: schedule-nginx
spec:
schedule:
repeat:
properties:
#format should be like "10m" or "2h" accordingly for minutes or hours
minChaosInterval: "2m"
engineTemplateSpec:
engineState: 'active'
appinfo:
appns: 'default'
applabel: 'app=nginx'
appkind: 'deployment'
annotationCheck: 'true'
chaosServiceAccount: pod-delete-sa
jobCleanUpPolicy: 'delete'
experiments:
- name: pod-delete
spec:
components:
env:
# set chaos duration (in sec) as desired
- name: TOTAL_CHAOS_DURATION
value: '30'
# set chaos interval (in sec) as desired
- name: CHAOS_INTERVAL
value: '10'
# pod failures without '--force' & default terminationGracePeriodSeconds
- name: FORCE
value: 'false'