Chore(ebs-loss): Add EBS Loss By Tag Experiment (#459)
* Chore(ebs-loss): Add EBS Loss By Tag Experiment Signed-off-by: uditgaurav <udit@chaosnative.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2020-10-28T10:28:08Z
|
||||
name: ebs-loss-by-id
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: ebs-loss-by-id
|
||||
categoryDescription: |
|
||||
EBS Loss By ID contains chaos to disrupt state of infra resources. The experiment can induce ebs volume loss against specified application for the give EBS Volume(s).
|
||||
- Causes ebs volume loss from node or ec2 instance for a certain chaos interval from total chaos duration.
|
||||
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod
|
||||
keywords:
|
||||
- Kubernetes
|
||||
- EBS
|
||||
- Volume
|
||||
- ID
|
||||
- State
|
||||
platforms:
|
||||
- AWS
|
||||
maturity: alpha
|
||||
chaosType: infra
|
||||
maintainers:
|
||||
- name: Udit Gaurav
|
||||
email: uditgaurav@mayadata.io
|
||||
provider:
|
||||
name: Mayadata
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: latest
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/kube-aws/ebs-loss-by-id
|
||||
- name: Documentation
|
||||
url: https://docs.litmuschaos.io/docs/ebs-loss-by-id/
|
||||
- name: Video
|
||||
url:
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/ebs-loss-by-id/experiment.yaml
|
31
charts/kube-aws/ebs-loss-by-id/engine.yaml
Normal file
31
charts/kube-aws/ebs-loss-by-id/engine.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: nginx-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
annotationCheck: 'false'
|
||||
chaosServiceAccount: ebs-loss-by-id-sa
|
||||
# It can be retain/delete
|
||||
jobCleanUpPolicy: 'delete'
|
||||
experiments:
|
||||
- name: ebs-loss-by-id
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
# set target ebs volume ID
|
||||
- name: EBS_VOLUME_ID
|
||||
value: ''
|
||||
|
||||
# provide the region name of the instance
|
||||
- name: REGION
|
||||
value: ''
|
81
charts/kube-aws/ebs-loss-by-id/experiment.yaml
Normal file
81
charts/kube-aws/ebs-loss-by-id/experiment.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Detaching an ebs volume from ec2 instance.
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: ebs-loss-by-id
|
||||
labels:
|
||||
name: ebs-loss-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: latest
|
||||
spec:
|
||||
definition:
|
||||
scope: Cluster
|
||||
permissions:
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "batch"
|
||||
- "litmuschaos.io"
|
||||
resources:
|
||||
- "jobs"
|
||||
- "pods"
|
||||
- "events"
|
||||
- "pods/log"
|
||||
- "pods/exec"
|
||||
- "secrets"
|
||||
- "chaosengines"
|
||||
- "chaosexperiments"
|
||||
- "chaosresults"
|
||||
verbs:
|
||||
- "create"
|
||||
- "list"
|
||||
- "get"
|
||||
- "patch"
|
||||
- "update"
|
||||
- "delete"
|
||||
image: "litmuschaos/go-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name ebs-loss-by-id
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
# Period to wait before and after injection of chaos in sec
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
|
||||
- name: EBS_VOLUME_ID
|
||||
value: ''
|
||||
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
# Provide the path of aws credentials mounted from secret
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: '/tmp/cloud_config.yml'
|
||||
|
||||
# provide the LIB
|
||||
# only litmus supported
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
|
||||
labels:
|
||||
name: ebs-loss-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: latest
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
46
charts/kube-aws/ebs-loss-by-id/rbac.yaml
Normal file
46
charts/kube-aws/ebs-loss-by-id/rbac.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: ebs-loss-by-id-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: ebs-loss-by-id-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: ebs-loss-by-id-sa
|
||||
labels:
|
||||
name: ebs-loss-by-id-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods","events","secrets"]
|
||||
verbs: ["create","list","get","patch","update","delete","deletecollection"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/exec","pods/log"]
|
||||
verbs: ["create","list","get"]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["create","list","get","delete","deletecollection"]
|
||||
- apiGroups: ["litmuschaos.io"]
|
||||
resources: ["chaosengines","chaosexperiments","chaosresults"]
|
||||
verbs: ["create","list","get","patch","update"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: ebs-loss-by-id-sa
|
||||
labels:
|
||||
name: ebs-loss-by-id-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: ebs-loss-by-id-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: ebs-loss-by-id-sa
|
||||
namespace: default
|
Reference in New Issue
Block a user