(feat)experiments: include network chaos in generic chart (#22)
Signed-off-by: ksatchit <karthik.s@openebs.io>
This commit is contained in:
committed by
GitHub
parent
cc52c5f3db
commit
729e458449
29
charts/generic/pod-network-latency/experiment.yaml
Normal file
29
charts/generic/pod-network-latency/experiment.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Injects network latency on pods belonging to an app deployment
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-network-latency
|
||||
version: 0.1.0
|
||||
spec:
|
||||
definition:
|
||||
image: "litmuschaos/ansible-runner:ci"
|
||||
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: TARGET_CONTAINER
|
||||
value: ""
|
||||
- name: NETWORK_INTERFACE
|
||||
value: "eth0"
|
||||
- name: NETWORK_LATENCY
|
||||
value: "60000" #in ms
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: "60000" #in ms
|
||||
- name: LIB
|
||||
value: "pumba"
|
||||
labels:
|
||||
name: pod-network-latency
|
@@ -1,7 +1,7 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: pod-network-delay
|
||||
name: pod-network-latency
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
@@ -9,9 +9,9 @@ metadata:
|
||||
repository: https://github.com/litmuschaos/chaos-charts
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: pod-network-delay
|
||||
displayName: pod-network-latency
|
||||
description: >
|
||||
Pod-network-delay contains chaos to disrupt network connectivity of kubernetes pods. Experiments can inject random network jitters, delays and packet loss on the app replica pods.
|
||||
Pod-network-latency contains chaos to disrupt network connectivity of kubernetes pods. Experiments can inject random network delays on the app replica pods.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- Network
|
||||
@@ -30,4 +30,4 @@ spec:
|
||||
icon:
|
||||
- base64data: ""
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod_network_delay/experiment.yaml
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod-network-latency/experiment.yaml
|
29
charts/generic/pod-network-loss/experiment.yaml
Normal file
29
charts/generic/pod-network-loss/experiment.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Injects network packet loss on pods belonging to an app deployment
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-network-loss
|
||||
version: 0.1.0
|
||||
spec:
|
||||
definition:
|
||||
image: "litmuschaos/ansible-runner:ci"
|
||||
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: TARGET_CONTAINER
|
||||
value: ""
|
||||
- name: NETWORK_INTERFACE
|
||||
value: "eth0"
|
||||
- name: NETWORK_PACKET_LOSS_PERCENTAGE
|
||||
value: "100" #in %
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: "60000" #in ms
|
||||
- name: LIB
|
||||
value: "pumba"
|
||||
labels:
|
||||
name: pod-network-loss
|
@@ -1,17 +1,17 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: pod-network-delay
|
||||
version: {{ VERSION }}
|
||||
name: pod-network-loss
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
repository: https://github.com/litmuschaos/chaos-charts
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: pod-network-delay
|
||||
displayName: pod-network-loss
|
||||
description: >
|
||||
Pod-network-delay contains chaos to disrupt network connectivity of kubernetes pods. Experiments can inject random network jitters, delays and packet loss on the app replica pods.
|
||||
Pod-network-loss contains chaos to disrupt network connectivity to kubernetes pods. Experiments can inject percentage packet loss on the app replica pods.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- Network
|
||||
@@ -30,4 +30,4 @@ spec:
|
||||
icon:
|
||||
- base64data: ""
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod_network_delay/experiment.yaml
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod-network-loss/experiment.yaml
|
@@ -1,27 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-network-delay
|
||||
version: {{ VERSION }}
|
||||
spec:
|
||||
definition:
|
||||
image: "litmuschaos/ansible-runner:ci"
|
||||
args:
|
||||
- -c
|
||||
- ansible-playbook ./experiments/generic/pod_network_delay/pod_network_delay_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: 15
|
||||
- name: CHAOS_INTERVAL
|
||||
value: 5
|
||||
- name: LIB
|
||||
value: ""
|
||||
labels:
|
||||
name: pod-network-delay
|
@@ -1,27 +0,0 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Deletes a pod belonging to a deployment/statefulset/daemonset
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-network-delay
|
||||
version: 0.1.0
|
||||
spec:
|
||||
definition:
|
||||
image: "litmuschaos/ansible-runner:ci"
|
||||
args:
|
||||
- -c
|
||||
- ansible-playbook ./experiments/generic/pod_network_delay/pod_network_delay_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: 15
|
||||
- name: CHAOS_INTERVAL
|
||||
value: 5
|
||||
- name: LIB
|
||||
value: ""
|
||||
labels:
|
||||
name: pod-network-delay
|
Reference in New Issue
Block a user