removed some charts of ansible experiments that are currently not in litmus-ansible. (#484)
* removed some charts of ansible experiments that are currently not in litmus-ansible Signed-off-by: Adarshkumar14 <1829034@kiit.ac.in>
This commit is contained in:
@@ -1,52 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: cassandra-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=cassandra'
|
|
||||||
appkind: 'statefulset'
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
chaosServiceAccount: cassandra-pod-delete-sa
|
|
||||||
experiments:
|
|
||||||
- name: cassandra-pod-delete
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
# set chaos duration (in sec) as desired
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '15'
|
|
||||||
|
|
||||||
# set chaos interval (in sec) as desired
|
|
||||||
- name: CHAOS_INTERVAL
|
|
||||||
value: '15'
|
|
||||||
|
|
||||||
# pod failures without '--force' & default terminationGracePeriodSeconds
|
|
||||||
- name: FORCE
|
|
||||||
value: 'false'
|
|
||||||
|
|
||||||
# provide cassandra service name
|
|
||||||
# default service: cassandra
|
|
||||||
- name: CASSANDRA_SVC_NAME
|
|
||||||
value: 'cassandra'
|
|
||||||
|
|
||||||
# provide the keyspace replication factor
|
|
||||||
- name: KEYSPACE_REPLICATION_FACTOR
|
|
||||||
value: '3'
|
|
||||||
|
|
||||||
# provide cassandra port
|
|
||||||
# default port: 9042
|
|
||||||
- name: CASSANDRA_PORT
|
|
||||||
value: '9042'
|
|
||||||
|
|
||||||
# SET THE CASSANDRA_LIVENESS_CHECK
|
|
||||||
# IT CAN BE `enabled` OR `disabled`
|
|
||||||
- name: CASSANDRA_LIVENESS_CHECK
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
|
|
@@ -1,115 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Deletes a pod belonging to a casandra statefulset
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Namespaced
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "apps"
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "deployments"
|
|
||||||
- "statefulsets"
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "pods/exec"
|
|
||||||
- "services"
|
|
||||||
- "events"
|
|
||||||
- "configmaps"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- "nodes"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/cassandra/pod-delete/pod_delete_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
# provide cassandra service name
|
|
||||||
# default service: cassandra
|
|
||||||
- name: CASSANDRA_SVC_NAME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# provide the keyspace replication factor
|
|
||||||
- name: KEYSPACE_REPLICATION_FACTOR
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# provide cassandra port
|
|
||||||
# default port: 9042
|
|
||||||
- name: CASSANDRA_PORT
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# provide liveness deployement port
|
|
||||||
# default port: 8088, It only supports 8088 port
|
|
||||||
- name: LIVENESS_SVC_PORT
|
|
||||||
value: '8088'
|
|
||||||
|
|
||||||
# provide cassandra liveness image
|
|
||||||
- name: CASSANDRA_LIVENESS_IMAGE
|
|
||||||
value: 'litmuschaos/cassandra-client:latest'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '15'
|
|
||||||
|
|
||||||
- name: CHAOS_INTERVAL
|
|
||||||
value: '15'
|
|
||||||
|
|
||||||
# SET THE CASSANDRA_LIVENESS_CHECK
|
|
||||||
# IT CAN BE `enabled` OR `disabled`
|
|
||||||
- name: CASSANDRA_LIVENESS_CHECK
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
## Period to wait before and after injection of chaos
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# provide the kill count
|
|
||||||
- name: KILL_COUNT
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: FORCE
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
## env var that describes the library used to execute the chaos
|
|
||||||
## default: litmus. Supported values: litmus, powerfulseal
|
|
||||||
- name: LIB
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","deployments","statefulsets","pods/log","pods/exec","services","events","jobs","configmaps","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["get","list"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
namespace: default
|
|
||||||
|
|
@@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","deployments","statefulsets","services","pods/log","pods/exec","events","jobs","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: cassandra-pod-delete-sa
|
|
||||||
namespace: default
|
|
||||||
|
|
@@ -1,32 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: container-kill-sa
|
|
||||||
experiments:
|
|
||||||
- name: container-kill
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
# specify the name of the container to be killed
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: 'nginx'
|
|
||||||
|
|
||||||
# provide the chaos interval
|
|
||||||
- name: CHAOS_INTERVAL
|
|
||||||
value: '10'
|
|
||||||
|
|
||||||
# provide the total chaos duration
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '20'
|
|
||||||
|
|
@@ -1,83 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: "Kills a container belonging to an application pod \n"
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: container-kill
|
|
||||||
labels:
|
|
||||||
name: container-kill
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Namespaced
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "apps"
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "pods/exec"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "update"
|
|
||||||
- "patch"
|
|
||||||
- "delete"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/container_kill/container_kill_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# Period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# It supports pumba and containerd
|
|
||||||
- name: LIB
|
|
||||||
value: 'pumba'
|
|
||||||
|
|
||||||
# provide the chaos interval
|
|
||||||
- name: CHAOS_INTERVAL
|
|
||||||
value: '10'
|
|
||||||
|
|
||||||
# provide the container runtime path for containerd
|
|
||||||
# applicable only for containerd runtime
|
|
||||||
- name: CONTAINER_PATH
|
|
||||||
value: '/run/containerd/containerd.sock'
|
|
||||||
|
|
||||||
# provide the total chaos duration
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '20'
|
|
||||||
|
|
||||||
# LIB_IMAGE can be - gaiaadm/pumba:0.6.5, litmuschaos/container-kill-helper:latest
|
|
||||||
# For pumba image use: gaiaadm/pumba:0.6.5
|
|
||||||
# For containerd image use: litmuschaos/container-kill-helper:latest
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'gaiaadm/pumba:0.6.5'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: container-kill
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: container-kill-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: container-kill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: container-kill-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: container-kill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","jobs","pods/exec","pods/log","events","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: container-kill-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: container-kill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: container-kill-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: container-kill-sa
|
|
||||||
namespace: default
|
|
||||||
|
|
@@ -1,27 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: disk-fill-sa
|
|
||||||
experiments:
|
|
||||||
- name: disk-fill
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
# specify the fill percentage according to the disk pressure required
|
|
||||||
- name: FILL_PERCENTAGE
|
|
||||||
value: '80'
|
|
||||||
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: 'nginx'
|
|
||||||
|
|
@@ -1,77 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Fillup Ephemeral Storage of a Resource
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: disk-fill
|
|
||||||
labels:
|
|
||||||
name: disk-fill
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Cluster
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "apps"
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/exec"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/disk_fill/disk_fill_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: FILL_PERCENTAGE
|
|
||||||
value: '80'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60'
|
|
||||||
|
|
||||||
# Period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# Provide the LIB here
|
|
||||||
# Only litmus supported
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
|
|
||||||
# Provide the container runtime path
|
|
||||||
# Default set to docker
|
|
||||||
- name: CONTAINER_PATH
|
|
||||||
value: '/var/lib/docker/containers'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: disk-fill
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: disk-fill-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: disk-fill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: disk-fill-sa
|
|
||||||
labels:
|
|
||||||
name: disk-fill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","apps","litmuschaos.io","batch"]
|
|
||||||
resources: ["pods","jobs","pods/exec","events","pods/log","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: disk-fill-sa
|
|
||||||
labels:
|
|
||||||
name: disk-fill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: disk-fill-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: disk-fill-sa
|
|
||||||
namespace: default
|
|
@@ -1,27 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: kubelet-service-kill-sa
|
|
||||||
experiments:
|
|
||||||
- name: kubelet-service-kill
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/hostname: 'node02'
|
|
||||||
env:
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '90' # in seconds
|
|
||||||
# provide the actual name of node under test
|
|
||||||
- name: APP_NODE
|
|
||||||
value: 'node-01'
|
|
@@ -1,68 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Kills the kubelet service on the application node to check the resiliency.
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: kubelet-service-kill
|
|
||||||
labels:
|
|
||||||
name: kubelet-service-kill
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Cluster
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "apps"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- "nodes"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/kubelet_service_kill/kubelet_service_kill_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '90' # in seconds
|
|
||||||
|
|
||||||
# Period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
labels:
|
|
||||||
name: kubelet-service-kill
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
labels:
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","jobs","pods/log","events","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["get","list"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
labels:
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kubelet-service-kill-sa
|
|
||||||
namespace: default
|
|
@@ -1,26 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: node-cpu-hog-sa
|
|
||||||
experiments:
|
|
||||||
- name: node-cpu-hog
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
# set chaos duration (in sec) as desired
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60'
|
|
||||||
|
|
||||||
- name: NODE_CPU_CORE
|
|
||||||
value: ''
|
|
@@ -1,81 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Give a cpu spike on a node belonging to a deployment
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: node-cpu-hog
|
|
||||||
labels:
|
|
||||||
name: node-cpu-hog
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Cluster
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "apps"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- "nodes"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/node_cpu_hog/node_cpu_hog_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60'
|
|
||||||
|
|
||||||
# Period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
## ENTER THE NUMBER OF CORES OF CPU FOR CPU HOGGING
|
|
||||||
## OPTIONAL VALUE IN CASE OF EMPTY VALUE IT WILL TAKE NODE CPU CAPACITY
|
|
||||||
- name: NODE_CPU_CORE
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# PROVIDE THE LIB HERE
|
|
||||||
# ONLY LITMUS SUPPORTED
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
|
|
||||||
# provide lib image
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'litmuschaos/stress-ng:latest'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: node-cpu-hog
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
labels:
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","jobs","events","chaosengines","pods/log","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["get","list"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
labels:
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: node-cpu-hog-sa
|
|
||||||
namespace: default
|
|
@@ -1,25 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: node-drain-sa
|
|
||||||
experiments:
|
|
||||||
- name: node-drain
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/hostname: 'node02'
|
|
||||||
env:
|
|
||||||
# set node name
|
|
||||||
- name: APP_NODE
|
|
||||||
value: 'node-01'
|
|
@@ -1,84 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Drain the node where application pod is scheduled
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: node-drain
|
|
||||||
labels:
|
|
||||||
name: node-drain
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Cluster
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "extensions"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "events"
|
|
||||||
- "pods/log"
|
|
||||||
- "daemonsets"
|
|
||||||
- "pods/eviction"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- "nodes"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
- "patch"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/node_drain/node_drain_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: LIVENESS_APP_LABEL
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: APP_NODE
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60'
|
|
||||||
|
|
||||||
# Provide the LIB here
|
|
||||||
# Only litmus supported
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
|
|
||||||
# Period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIVENESS_APP_NAMESPACE
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: node-drain
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: node-drain-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: node-drain-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: node-drain-sa
|
|
||||||
labels:
|
|
||||||
name: node-drain-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","extensions"]
|
|
||||||
resources: ["pods","jobs","events","chaosengines","pods/log","daemonsets","pods/eviction","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["patch","get","list"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: node-drain-sa
|
|
||||||
labels:
|
|
||||||
name: node-drain-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: node-drain-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: node-drain-sa
|
|
||||||
namespace: default
|
|
@@ -1,28 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: node-memory-hog-sa
|
|
||||||
experiments:
|
|
||||||
- name: node-memory-hog
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
# set chaos duration (in sec) as desired
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '120'
|
|
||||||
|
|
||||||
## specify the size as percent of total available memory (in percentage %)
|
|
||||||
## default value 90%
|
|
||||||
- name: MEMORY_PERCENTAGE
|
|
||||||
value: '90'
|
|
@@ -1,81 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Give a memory hog on a node belonging to a deployment
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: node-memory-hog
|
|
||||||
labels:
|
|
||||||
name: node-memory-hog
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Cluster
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "apps"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "list"
|
|
||||||
- "get"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- "nodes"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/node_memory_hog/node_memory_hog_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '120'
|
|
||||||
|
|
||||||
## specify the size as percent of total available memory (in percentage %)
|
|
||||||
## Default value "90%"
|
|
||||||
- name: MEMORY_PERCENTAGE
|
|
||||||
value: '90'
|
|
||||||
|
|
||||||
# Period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# Provide the LIB here
|
|
||||||
# Only litmus supported
|
|
||||||
- name: LIB
|
|
||||||
value: 'litmus'
|
|
||||||
|
|
||||||
# provide lib image
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'litmuschaos/stress-ng:latest'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: node-memory-hog
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
labels:
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","jobs","pods/log","events","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["get","list"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
labels:
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: node-memory-hog-sa
|
|
||||||
namespace: default
|
|
@@ -1,31 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-network-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: pod-network-corruption-sa
|
|
||||||
experiments:
|
|
||||||
- name: pod-network-corruption
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
#Container name where chaos has to be injected
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: 'nginx'
|
|
||||||
|
|
||||||
#Network interface inside target container
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
@@ -1,76 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Inject network packet corruption into application pod
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: pod-network-corruption
|
|
||||||
labels:
|
|
||||||
name: pod-network-corruption
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Namespaced
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "delete"
|
|
||||||
- "list"
|
|
||||||
- "patch"
|
|
||||||
- "update"
|
|
||||||
- "get"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/pod_network_corruption/pod_network_corruption_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# provide lib image
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'gaiaadm/pumba:0.6.5'
|
|
||||||
|
|
||||||
- name: TC_IMAGE
|
|
||||||
value: 'gaiadocker/iproute2'
|
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: NETWORK_PACKET_CORRUPTION_PERCENTAGE
|
|
||||||
value: '100' #in PERCENTAGE
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
||||||
|
|
||||||
# Time period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB
|
|
||||||
value: 'pumba'
|
|
||||||
labels:
|
|
||||||
name: pod-network-corruption
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch"]
|
|
||||||
resources: ["pods","jobs","events","pods/log","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: pod-network-corruption-sa
|
|
||||||
namespace: default
|
|
@@ -1,37 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-network-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: pod-network-latency-sa
|
|
||||||
experiments:
|
|
||||||
- name: pod-network-latency
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
#Container name where chaos has to be injected
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: 'nginx'
|
|
||||||
|
|
||||||
#Network interface inside target container
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'gaiaadm/pumba:0.6.5'
|
|
||||||
|
|
||||||
- name: NETWORK_LATENCY
|
|
||||||
value: '2000'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
@@ -1,76 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Injects network latency on pods belonging to an app deployment
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: pod-network-latency
|
|
||||||
labels:
|
|
||||||
name: pod-network-latency
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
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"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/pod_network_latency/pod_network_latency_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: TC_IMAGE
|
|
||||||
value: 'gaiadocker/iproute2'
|
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
# provide lib image
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'gaiaadm/pumba:0.6.5'
|
|
||||||
|
|
||||||
- name: NETWORK_LATENCY
|
|
||||||
value: '2000' #in ms
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
||||||
|
|
||||||
# Time period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB
|
|
||||||
value: 'pumba'
|
|
||||||
labels:
|
|
||||||
name: pod-network-latency
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch"]
|
|
||||||
resources: ["pods","jobs","pods/log","events","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: pod-network-latency-sa
|
|
||||||
namespace: default
|
|
@@ -1,39 +0,0 @@
|
|||||||
# chaosengine.yaml
|
|
||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: nginx-network-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
|
||||||
applabel: 'app=nginx'
|
|
||||||
appkind: 'deployment'
|
|
||||||
chaosServiceAccount: pod-network-loss-sa
|
|
||||||
experiments:
|
|
||||||
- name: pod-network-loss
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
#Container name where chaos has to be injected
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: 'nginx'
|
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'gaiaadm/pumba:0.6.5'
|
|
||||||
|
|
||||||
#Network interface inside target container
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
|
||||||
value: '100'
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
||||||
|
|
@@ -1,74 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
description:
|
|
||||||
message: |
|
|
||||||
Injects network packet loss on pods belonging to an app deployment
|
|
||||||
kind: ChaosExperiment
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: chaosexperiment
|
|
||||||
app.kubernetes.io/version: latest
|
|
||||||
spec:
|
|
||||||
definition:
|
|
||||||
scope: Namespaced
|
|
||||||
permissions:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/log"
|
|
||||||
- "events"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
- "patch"
|
|
||||||
- "create"
|
|
||||||
- "update"
|
|
||||||
- "delete"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/generic/pod_network_loss/pod_network_loss_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: TARGET_CONTAINER
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
# provide lib image
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'gaiaadm/pumba:0.6.5'
|
|
||||||
|
|
||||||
- name: TC_IMAGE
|
|
||||||
value: 'gaiadocker/iproute2'
|
|
||||||
|
|
||||||
- name: NETWORK_INTERFACE
|
|
||||||
value: 'eth0'
|
|
||||||
|
|
||||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
|
||||||
value: '100' #in PERCENTAGE
|
|
||||||
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60' # in seconds
|
|
||||||
|
|
||||||
# ime period to wait before injection of chaos in sec
|
|
||||||
- name: RAMP_TIME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: LIB
|
|
||||||
value: 'pumba'
|
|
||||||
labels:
|
|
||||||
name: pod-network-loss
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
app.kubernetes.io/component: experiment-job
|
|
||||||
app.kubernetes.io/version: latest
|
|
@@ -1,38 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: Role
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch"]
|
|
||||||
resources: ["pods","jobs","events","pods/log","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","update","delete"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: pod-network-loss-sa
|
|
||||||
namespace: default
|
|
@@ -1,74 +0,0 @@
|
|||||||
apiVersion: litmuschaos.io/v1alpha1
|
|
||||||
kind: ChaosEngine
|
|
||||||
metadata:
|
|
||||||
name: kafka-chaos
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
# It can be active/stop
|
|
||||||
engineState: 'active'
|
|
||||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
|
||||||
auxiliaryAppInfo: ''
|
|
||||||
appinfo:
|
|
||||||
appns: 'default'
|
|
||||||
applabel: 'app=cp-kafka'
|
|
||||||
appkind: 'statefulset'
|
|
||||||
chaosServiceAccount: kafka-broker-pod-failure-sa
|
|
||||||
experiments:
|
|
||||||
- name: kafka-broker-pod-failure
|
|
||||||
spec:
|
|
||||||
components:
|
|
||||||
env:
|
|
||||||
# choose based on available kafka broker replicas
|
|
||||||
- name: KAFKA_REPLICATION_FACTOR
|
|
||||||
value: '3'
|
|
||||||
|
|
||||||
# get via 'kubectl get pods --show-labels -n <kafka-namespace>'
|
|
||||||
- name: KAFKA_LABEL
|
|
||||||
value: 'app=cp-kafka'
|
|
||||||
|
|
||||||
- name: KAFKA_NAMESPACE
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
# get via 'kubectl get svc -n <kafka-namespace>'
|
|
||||||
- name: KAFKA_SERVICE
|
|
||||||
value: 'kafka-cp-kafka-headless'
|
|
||||||
|
|
||||||
# get via 'kubectl get svc -n <kafka-namespace>'
|
|
||||||
- name: KAFKA_PORT
|
|
||||||
value: '9092'
|
|
||||||
|
|
||||||
# Recommended timeout for EKS platform: 60000 ms
|
|
||||||
- name: KAFKA_CONSUMER_TIMEOUT
|
|
||||||
value: '30000' # in milliseconds
|
|
||||||
|
|
||||||
# ensure to set the instance name if using KUDO operator
|
|
||||||
- name: KAFKA_INSTANCE_NAME
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- name: ZOOKEEPER_NAMESPACE
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
# get via 'kubectl get pods --show-labels -n <zk-namespace>'
|
|
||||||
- name: ZOOKEEPER_LABEL
|
|
||||||
value: 'app=cp-zookeeper'
|
|
||||||
|
|
||||||
# get via 'kubectl get svc -n <zk-namespace>
|
|
||||||
- name: ZOOKEEPER_SERVICE
|
|
||||||
value: 'kafka-cp-zookeeper-headless'
|
|
||||||
|
|
||||||
# get via 'kubectl get svc -n <zk-namespace>
|
|
||||||
- name: ZOOKEEPER_PORT
|
|
||||||
value: '2181'
|
|
||||||
|
|
||||||
# set chaos duration (in sec) as desired
|
|
||||||
- name: TOTAL_CHAOS_DURATION
|
|
||||||
value: '60'
|
|
||||||
|
|
||||||
# set chaos interval (in sec) as desired
|
|
||||||
- name: CHAOS_INTERVAL
|
|
||||||
value: '20'
|
|
||||||
|
|
||||||
# pod failures without '--force' & default terminationGracePeriodSeconds
|
|
||||||
- name: FORCE
|
|
||||||
value: 'false'
|
|
||||||
|
|
@@ -1,133 +0,0 @@
|
|||||||
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:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
- "apps"
|
|
||||||
- "batch"
|
|
||||||
- "litmuschaos.io"
|
|
||||||
resources:
|
|
||||||
- "statefulsets"
|
|
||||||
- "deployments"
|
|
||||||
- "events"
|
|
||||||
- "pods/log"
|
|
||||||
- "configmaps"
|
|
||||||
- "jobs"
|
|
||||||
- "pods"
|
|
||||||
- "pods/exec"
|
|
||||||
- "chaosengines"
|
|
||||||
- "chaosexperiments"
|
|
||||||
- "chaosresults"
|
|
||||||
verbs:
|
|
||||||
- "create"
|
|
||||||
- "get"
|
|
||||||
- "delete"
|
|
||||||
- "list"
|
|
||||||
- "patch"
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- "nodes"
|
|
||||||
verbs:
|
|
||||||
- "get"
|
|
||||||
- "list"
|
|
||||||
image: "litmuschaos/ansible-runner:latest"
|
|
||||||
imagePullPolicy: Always
|
|
||||||
args:
|
|
||||||
- -c
|
|
||||||
- ansible-playbook ./experiments/kafka/kafka-broker-pod-failure/kafka-broker-pod-failure-ansible-logic.yml -i /etc/ansible/hosts -vv; exit 0
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
env:
|
|
||||||
|
|
||||||
- name: ANSIBLE_STDOUT_CALLBACK
|
|
||||||
value: 'default'
|
|
||||||
|
|
||||||
- name: KAFKA_KIND
|
|
||||||
value: 'statefulset'
|
|
||||||
|
|
||||||
- name: KAFKA_LIVENESS_STREAM
|
|
||||||
value: 'enabled'
|
|
||||||
|
|
||||||
- name: KAFKA_LIVENESS_IMAGE
|
|
||||||
value: 'litmuschaos/kafka-client:ci'
|
|
||||||
|
|
||||||
# set to 'enabled' if you have auth set up
|
|
||||||
- name: KAFKA_SASL_AUTH
|
|
||||||
value: 'disabled'
|
|
||||||
|
|
||||||
# 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'
|
|
||||||
|
|
||||||
# provide the kill count
|
|
||||||
- name: KILL_COUNT
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
- 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'
|
|
||||||
|
|
||||||
- name: LIB_IMAGE
|
|
||||||
value: 'litmuschaos/pod-delete-helper:latest'
|
|
||||||
|
|
||||||
labels:
|
|
||||||
name: kafka-broker-pod-failure
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
|
|
@@ -1,39 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
namespace: default
|
|
||||||
labels:
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
labels:
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["","litmuschaos.io","batch","apps"]
|
|
||||||
resources: ["pods","deployments","pods/log","events","jobs","pods/exec","statefulsets","configmaps","chaosengines","chaosexperiments","chaosresults"]
|
|
||||||
verbs: ["create","list","get","patch","delete"]
|
|
||||||
- apiGroups: [""]
|
|
||||||
resources: ["nodes"]
|
|
||||||
verbs: ["get","list"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
labels:
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
app.kubernetes.io/part-of: litmus
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kafka-broker-pod-failure-sa
|
|
||||||
namespace: default
|
|
Reference in New Issue
Block a user