Directory restructure to add scenarios and experiments (#559)
* Updated dir struture with scenarios and experiments dir Signed-off-by: Amit Kumar Das <amit.das@harness.io> * Added icons Signed-off-by: Amit Kumar Das <amit.das@harness.io>
This commit is contained in:
127
experiments/kafka/kafka-broker-pod-failure/experiment.yaml
Normal file
127
experiments/kafka/kafka-broker-pod-failure/experiment.yaml
Normal file
@@ -0,0 +1,127 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deleting a kafka broker pod
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: kafka-broker-pod-failure
|
||||
labels:
|
||||
name: kafka-broker-pod-failure
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Cluster
|
||||
permissions:
|
||||
# Create and monitor the experiment & helper pods
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["create","delete","get","list","patch","update", "deletecollection"]
|
||||
# Performs CRUD operations on the events inside chaosengine and chaosresult
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["create","get","list","patch","update"]
|
||||
# Fetch configmaps & secrets details and mount it to the experiment pod (if specified)
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets","configmaps"]
|
||||
verbs: ["get","list",]
|
||||
# Track and get the runner, experiment, and helper pods log
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/log"]
|
||||
verbs: ["get","list","watch"]
|
||||
# for creating and managing to execute comands inside target container
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/exec"]
|
||||
verbs: ["get","list","create"]
|
||||
# for deriving the parent/owner details of the pod
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments","statefulsets"]
|
||||
verbs: ["list","get"]
|
||||
# for configuring and monitor the experiment job by the chaos-runner pod
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["create","list","get","delete","deletecollection"]
|
||||
# for creation, status polling and deletion of litmus chaos resources used within a chaos workflow
|
||||
- apiGroups: ["litmuschaos.io"]
|
||||
resources: ["chaosengines","chaosexperiments","chaosresults"]
|
||||
verbs: ["create","list","get","patch","update","delete"]
|
||||
image: "litmuschaos/go-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name kafka-broker-pod-failure
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
|
||||
- name: KAFKA_KIND
|
||||
value: 'statefulset'
|
||||
|
||||
- name: KAFKA_LIVENESS_STREAM
|
||||
value: 'enable'
|
||||
|
||||
- name: KAFKA_LIVENESS_IMAGE
|
||||
value: 'litmuschaos/kafka-client:latest'
|
||||
|
||||
# Recommended timeout for EKS platform: 60000 ms
|
||||
- name: KAFKA_CONSUMER_TIMEOUT
|
||||
value: '30000' #in ms
|
||||
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '15'
|
||||
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '5'
|
||||
|
||||
## it defines the sequence of chaos execution for multiple target pods
|
||||
## supported values: serial, parallel
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
- name: FORCE
|
||||
value: 'true'
|
||||
|
||||
- name: KAFKA_INSTANCE_NAME
|
||||
value: ''
|
||||
|
||||
- name: KAFKA_NAMESPACE
|
||||
value: ''
|
||||
|
||||
- name: KAFKA_LABEL
|
||||
value: ''
|
||||
|
||||
- name: KAFKA_BROKER
|
||||
value: ''
|
||||
|
||||
- name: KAFKA_REPLICATION_FACTOR
|
||||
value: ''
|
||||
|
||||
- name: KAFKA_SERVICE
|
||||
value: ''
|
||||
|
||||
- name: KAFKA_PORT
|
||||
value: ''
|
||||
|
||||
- name: ZOOKEEPER_NAMESPACE
|
||||
value: ''
|
||||
|
||||
- name: ZOOKEEPER_LABEL
|
||||
value: ''
|
||||
|
||||
- name: ZOOKEEPER_SERVICE
|
||||
value: ''
|
||||
|
||||
- name: ZOOKEEPER_PORT
|
||||
value: ''
|
||||
|
||||
## env var that describes the library used to execute the chaos
|
||||
## default: litmus. Supported values: litmus
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
|
||||
labels:
|
||||
name: kafka-broker-pod-failure
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
Reference in New Issue
Block a user