* chore(permissions): sync the experiment and rbac permissions Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io> * Add "statefulsets" in pod autoscaler permissions Signed-off-by: udit <udit.gaurav@mayadata.io> Co-authored-by: udit <udit.gaurav@mayadata.io>
121 lines
2.8 KiB
YAML
121 lines
2.8 KiB
YAML
apiVersion: litmuschaos.io/v1alpha1
|
|
description:
|
|
message: |
|
|
Injects network packet loss on pods belonging to an app deployment
|
|
kind: ChaosExperiment
|
|
metadata:
|
|
name: pod-network-loss
|
|
labels:
|
|
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"
|
|
- "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:
|
|
- "get"
|
|
- "list"
|
|
- "patch"
|
|
- "create"
|
|
- "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: ''
|
|
|
|
# provide lib image
|
|
- 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: '60' # in seconds
|
|
|
|
# ime period to wait before and after injection of chaos in sec
|
|
- name: RAMP_TIME
|
|
value: ''
|
|
|
|
# it can be litmus or pumba
|
|
- name: LIB
|
|
value: 'litmus'
|
|
|
|
## percentage of total pods to target
|
|
- name: PODS_AFFECTED_PERC
|
|
value: ''
|
|
|
|
- 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: 'docker'
|
|
|
|
# provide the destination ips
|
|
# chaos injection will be triggered for these destination ips
|
|
- name: DESTINATION_IPS
|
|
value: ''
|
|
|
|
# provide the destination hosts
|
|
# chaos injection will be triggered for these destination hosts
|
|
- name: DESTINATION_HOSTS
|
|
value: ''
|
|
|
|
# provide the socket file path
|
|
- 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'
|
|
|
|
labels:
|
|
name: pod-network-loss
|
|
app.kubernetes.io/part-of: litmus
|
|
app.kubernetes.io/component: experiment-job
|
|
app.kubernetes.io/version: latest
|