chore(new-chart): Add chaos chart for pod network duplication (#253)
Signed-off-by: Udit Gaurav <uditgaurav@gmail.com>
This commit is contained in:
43
charts/generic/pod-network-duplication/engine.yaml
Normal file
43
charts/generic/pod-network-duplication/engine.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
# chaosengine.yaml
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: nginx-network-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
# It can be delete/retain
|
||||
jobCleanUpPolicy: 'delete'
|
||||
# It can be true/false
|
||||
annotationCheck: 'true'
|
||||
# It can be active/stop
|
||||
engineState: 'active'
|
||||
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||
auxiliaryAppInfo: ''
|
||||
monitoring: false
|
||||
appinfo:
|
||||
appns: 'default'
|
||||
# FYI, To see app label, apply kubectl get pods --show-labels
|
||||
applabel: 'app=nginx'
|
||||
appkind: 'deployment'
|
||||
chaosServiceAccount: pod-network-duplication-sa
|
||||
experiments:
|
||||
- name: pod-network-duplication
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '60' # in seconds
|
||||
|
||||
- name: LIB_IMAGE
|
||||
value: 'gaiaadm/pumba:0.6.5'
|
||||
|
||||
#Network interface inside target container
|
||||
- name: NETWORK_INTERFACE
|
||||
value: 'eth0'
|
||||
|
||||
- name: NETWORK_PACKET_DUPLICATION_PERCENTAGE
|
||||
value: '100'
|
||||
|
||||
#If not provided it will take the first container of the target pod
|
||||
- name: TARGET_CONTAINER
|
||||
value: ''
|
54
charts/generic/pod-network-duplication/experiment.yaml
Normal file
54
charts/generic/pod-network-duplication/experiment.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Injects network packet duplication on pods belonging to an app deployment
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: pod-network-duplication
|
||||
version: 0.1.0
|
||||
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/go-runner:latest"
|
||||
args:
|
||||
- -c
|
||||
- ./experiments/pod-network-duplication
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '60'
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
- name: TARGET_CONTAINER
|
||||
value: ''
|
||||
- name: NETWORK_INTERFACE
|
||||
value: 'eth0'
|
||||
- name: NETWORK_PACKET_DUPLICATION_PERCENTAGE
|
||||
value: '100' # in percentage
|
||||
- name: LIB
|
||||
value: 'pumba'
|
||||
- name: LIB_IMAGE
|
||||
value: 'gaiaadm/pumba:0.6.5'
|
||||
labels:
|
||||
name: pod-network-duplication
|
@@ -0,0 +1,43 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2020-07-01T10:28:08Z
|
||||
name: pod-network-duplication
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: pod-network-duplication
|
||||
categoryDescription: |
|
||||
Pod-network-duplication contains chaos to disrupt network connectivity to kubernetes pods. Experiments can inject percentage packet duplication on the app replica pods.
|
||||
- Causes lossy access to application replica by injecting packet duplication using pumba.
|
||||
- The application pod should be healthy once chaos is stopped. Service-requests should be served (say, via alternate replicas) despite chaos.
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- Network
|
||||
- Duplication
|
||||
platforms:
|
||||
- GKE
|
||||
- Minikube
|
||||
- Packet(Kubeadm)
|
||||
- EKS
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: Udit Gaurav
|
||||
email: udit.gaurav@mayadata.io
|
||||
minKubeVersion: 1.12.0
|
||||
provider:
|
||||
name: Mayadata
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/generic/pod-network-duplication
|
||||
- name: Documentation
|
||||
url: https://docs.litmuschaos.io/docs/pod-network-duplication/
|
||||
- name: Video
|
||||
url:
|
||||
icon:
|
||||
- base64data: ""
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/pod-network-duplication/experiment.yaml
|
35
charts/generic/pod-network-duplication/rbac.yaml
Normal file
35
charts/generic/pod-network-duplication/rbac.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: pod-network-duplication-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: pod-network-duplication-sa
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: pod-network-duplication-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: pod-network-duplication-sa
|
||||
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/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: pod-network-duplication-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: pod-network-duplication-sa
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: pod-network-duplication-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: pod-network-duplication-sa
|
||||
namespace: default
|
Reference in New Issue
Block a user