Files
litmus-hub/charts/generic/pod-network-latency/experiment.yaml
2020-10-05 13:53:43 +05:30

97 lines
2.1 KiB
YAML

apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Injects network latency on pods belonging to an app deployment
kind: ChaosExperiment
metadata:
name: pod-network-latency
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"
- "deletecollection"
image: "litmuschaos/go-runner:latest"
imagePullPolicy: Always
args:
- -c
- ./experiments -name pod-network-latency
command:
- /bin/bash
env:
- name: TARGET_CONTAINER
value: ''
- name: NETWORK_INTERFACE
value: 'eth0'
# provide lib image
- name: LIB_IMAGE
value: 'litmuschaos/go-runner:latest'
- name: TC_IMAGE
value: 'gaiadocker/iproute2'
- name: NETWORK_LATENCY
value: '60000' #in ms
- name: TOTAL_CHAOS_DURATION
value: '60' # in seconds
# Time period to wait before and after injection of chaos in sec
- name: RAMP_TIME
value: ''
- name: LIB
value: 'litmus'
## percentage of total pods to target
- name: PODS_AFFECTED_PERC
value: ''
- name: TARGET_POD
value: ''
# provide the name of container runtime
# it supports docker, containerd, crio
# default to docker
- name: CONTAINER_RUNTIME
value: 'docker'
# provide the target ips
# chaos injection will be triggered for these destination ips
- name: TARGET_IPs
value: ''
# provide the target hosts
# chaos injection will be triggered for these destination hosts
- name: TARGET_HOSTS
value: ''
# provide the socket file path
# applicable only for containerd and crio runtime
- name: SOCKET_PATH
value: '/run/containerd/containerd.sock'
labels:
name: pod-network-latency