(feat): OpenEBS pool disk loss chart (#173)
* Adding openEBS disk loss experiment's chart Signed-off-by: Raj <raj.das@mayadata.io>
This commit is contained in:
BIN
charts/openebs/icons/openebs-pool-disk-loss.png
Normal file
BIN
charts/openebs/icons/openebs-pool-disk-loss.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
66
charts/openebs/openebs-pool-disk-loss/engine.yaml
Normal file
66
charts/openebs/openebs-pool-disk-loss/engine.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: pool-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be true/false
|
||||||
|
annotationCheck: 'false'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=busybox
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
appinfo:
|
||||||
|
appns: 'default'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: pool-disk-loss-sa
|
||||||
|
monitoring: false
|
||||||
|
# It can be delete/retain
|
||||||
|
jobCleanUpPolicy: 'delete'
|
||||||
|
experiments:
|
||||||
|
- name: openebs-pool-disk-loss
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
- name: APP_PVC
|
||||||
|
value: 'demo-nginx-claim'
|
||||||
|
|
||||||
|
# This is a chaos namespace which will create all infra chaos resources in that namespace
|
||||||
|
- name: CHAOS_NAMESPACE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Only GCP and AWS is supported
|
||||||
|
- name: CLOUD_PLATFORM
|
||||||
|
value: 'GCP'
|
||||||
|
|
||||||
|
# Enter the time duration in sec after the disk is dettached
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Period to wait before injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Enter the project id for gcp only
|
||||||
|
- name: PROJECT_ID
|
||||||
|
value: 'litmus-demo-123'
|
||||||
|
|
||||||
|
# Enter the node name
|
||||||
|
- name: NODE_NAME
|
||||||
|
value: 'demo-node-123'
|
||||||
|
|
||||||
|
# Enter the disk name
|
||||||
|
- name: DISK_NAME
|
||||||
|
value: 'demo-disk-123 '
|
||||||
|
|
||||||
|
# Enter the device name
|
||||||
|
- name: DEVICE_NAME
|
||||||
|
value: '/dev/sdb'
|
||||||
|
|
||||||
|
# Enter the zone name
|
||||||
|
- name: ZONE_NAME
|
||||||
|
value: 'us-central1-a'
|
||||||
|
|
||||||
|
- name: OPENEBS_NAMESPACE
|
||||||
|
value: 'openebs'
|
104
charts/openebs/openebs-pool-disk-loss/experiment.yaml
Normal file
104
charts/openebs/openebs-pool-disk-loss/experiment.yaml
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
OpenEBS Pool Disk Loss contains chaos to disrupt state of infra resources. Experiments can inject disk loss against openEBS pool.
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
litmuschaos.io/name: openebs
|
||||||
|
name: openebs-pool-disk-loss
|
||||||
|
version: 0.1.0
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Cluster
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "apps"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
- "batch"
|
||||||
|
- "extensions"
|
||||||
|
- "storage.k8s.io"
|
||||||
|
- "openebs.io"
|
||||||
|
resources:
|
||||||
|
- "pods"
|
||||||
|
- "jobs"
|
||||||
|
- "pods/log"
|
||||||
|
- "events"
|
||||||
|
- "pods/exec"
|
||||||
|
- "cstorpools"
|
||||||
|
- "configmaps"
|
||||||
|
- "secrets"
|
||||||
|
- "storageclasses"
|
||||||
|
- "persistentvolumes"
|
||||||
|
- "persistentvolumeclaims"
|
||||||
|
- "cstorvolumereplicas"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
- "chaosengines"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
image: "litmuschaos/ansible-runner:latest"
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ansible-playbook ./experiments/openebs/openebs-pool-disk-loss/openebs_pool_disk_loss_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: '60'
|
||||||
|
|
||||||
|
# Period to wait before injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: CHAOS_NAMESPACE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# It supports GCP and AWS
|
||||||
|
- name: CLOUD_PLATFORM
|
||||||
|
value: 'GCP'
|
||||||
|
|
||||||
|
- name: PROJECT_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: NODE_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: DISK_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: ZONE_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: DEVICE_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: LIVENESS_APP_LABEL
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: LIVENESS_APP_NAMESPACE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: DATA_PERSISTENCE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: OPENEBS_NAMESPACE
|
||||||
|
value: 'openebs'
|
||||||
|
labels:
|
||||||
|
name: openebs-pool-disk-loss
|
||||||
|
configmaps:
|
||||||
|
- name: openebs-pool-disk-loss
|
||||||
|
mountPath: /mnt/
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
@@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2020-03-13T10:28:08Z
|
||||||
|
name: openebs-pool-disk-loss
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: OpenEBS
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.openebs.io/
|
||||||
|
spec:
|
||||||
|
displayName: openebs-pool-disk-loss
|
||||||
|
categoryDescription: >
|
||||||
|
OpenEBS Pool Disk Loss contains chaos to disrupt state of infra resources. Experiments can inject disk loss against openEBS pool.
|
||||||
|
- Causes (forced/graceful) disk loss from the node disk pool.
|
||||||
|
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod.
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- Storage Pool
|
||||||
|
- OpenEBS
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: Raj Babu Das
|
||||||
|
email: raj.das@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
links:
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/litmuschaos/litmus/tree/master/experiments/openebs/openebs-pool-disk-loss
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.litmuschaos.io/docs/openebs-pool-disk-loss/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url: ""
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/openebs/openebs-pool-disk-loss/experiment.yaml
|
35
charts/openebs/openebs-pool-disk-loss/rbac.yaml
Normal file
35
charts/openebs/openebs-pool-disk-loss/rbac.yaml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
---
|
||||||
|
# Source: openebs/templates/clusterrole.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
labels:
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["","apps","litmuschaos.io","batch","extensions","storage.k8s.io","openebs.io"]
|
||||||
|
resources: ["pods", "pods/log", "jobs", "events", "pods/exec", "cstorpools", "configmaps", "secrets", "storageclasses", "persistentvolumes", "persistentvolumeclaims", "cstorvolumereplicas", "chaosexperiments", "chaosresults", "chaosengines"]
|
||||||
|
verbs: ["create","list","get","patch","update","delete"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
labels:
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: pool-disk-loss-sa
|
||||||
|
namespace: default
|
@@ -24,6 +24,7 @@ spec:
|
|||||||
- openebs-pool-network-delay
|
- openebs-pool-network-delay
|
||||||
- openebs-pool-network-loss
|
- openebs-pool-network-loss
|
||||||
- openebs-control-plane-chaos
|
- openebs-control-plane-chaos
|
||||||
|
- openebs-pool-disk-loss
|
||||||
keywords:
|
keywords:
|
||||||
- OpenEBS
|
- OpenEBS
|
||||||
- CAS
|
- CAS
|
||||||
|
@@ -27,3 +27,6 @@ experiments:
|
|||||||
- name: openebs-pool-network-loss
|
- name: openebs-pool-network-loss
|
||||||
CSV: openebs-pool-network-loss.chartserviceversion.yaml
|
CSV: openebs-pool-network-loss.chartserviceversion.yaml
|
||||||
desc: "openebs-pool-network-loss"
|
desc: "openebs-pool-network-loss"
|
||||||
|
- name: openebs-pool-disk-loss
|
||||||
|
CSV: openebs-pool-disk-loss.chartserviceversion.yaml
|
||||||
|
desc: "openebs-pool-disk-loss"
|
Reference in New Issue
Block a user