(feat): Adding NFS kill exp chart (#213)
* Adding openEBS nfs kill experiment charts Signed-off-by: Raj <raj.das@mayadata.io>
This commit is contained in:
BIN
charts/openebs/icons/openebs-nfs-provisioner-kill.png
Normal file
BIN
charts/openebs/icons/openebs-nfs-provisioner-kill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
45
charts/openebs/openebs-nfs-provisioner-kill/engine.yaml
Normal file
45
charts/openebs/openebs-nfs-provisioner-kill/engine.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nfs-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be true/false
|
||||||
|
annotationCheck: 'false'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
appinfo:
|
||||||
|
appns: 'minio'
|
||||||
|
applabel: 'app=minio'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: nfs-chaos-sa
|
||||||
|
monitoring: false
|
||||||
|
# It can be delete/retain
|
||||||
|
jobCleanUpPolicy: 'delete'
|
||||||
|
experiments:
|
||||||
|
- name: openebs-nfs-provisioner-kill
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
- name: NFS_PROVISIONER_NAMESPACE
|
||||||
|
value: 'app-nfs-ns'
|
||||||
|
|
||||||
|
## Period to wait before injection of chaos
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
- name: NFS_PROVISIONER_LABEL
|
||||||
|
value: 'app=nfs'
|
||||||
|
|
||||||
|
- name: NFS_PVC
|
||||||
|
value: 'nfs-pvc-claim'
|
||||||
|
|
||||||
|
- name: NFS_SVC
|
||||||
|
value: 'nfs-provisioner'
|
||||||
|
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: 'nfs-provisioner'
|
||||||
|
|
||||||
|
# EXTERNAL_APP_CHECK can be true/false
|
||||||
|
- name: EXTERNAL_APP_CHECK
|
||||||
|
value: 'true'
|
93
charts/openebs/openebs-nfs-provisioner-kill/experiment.yaml
Normal file
93
charts/openebs/openebs-nfs-provisioner-kill/experiment.yaml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Kill the OpenEBS NFS provisioner container and check if pods consuming the NFS PVs continue to be available and volumes are writable (RWM mode)
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
litmuschaos.io/name: openebs
|
||||||
|
name: openebs-nfs-provisioner-kill
|
||||||
|
version: 0.1.0
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Cluster
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "apps"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
- "batch"
|
||||||
|
- "extensions"
|
||||||
|
- "storage.k8s.io"
|
||||||
|
resources:
|
||||||
|
- "pods"
|
||||||
|
- "pods/exec"
|
||||||
|
- "pods/log"
|
||||||
|
- "deployments"
|
||||||
|
- "events"
|
||||||
|
- "jobs"
|
||||||
|
- "configmaps"
|
||||||
|
- "services"
|
||||||
|
- "persistentvolumeclaims"
|
||||||
|
- "storageclasses"
|
||||||
|
- "persistentvolumes"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
- "chaosengines"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- "nodes"
|
||||||
|
verbs:
|
||||||
|
- "get"
|
||||||
|
- "list"
|
||||||
|
|
||||||
|
image: "litmuschaos/ansible-runner:latest"
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ansible-playbook ./experiments/openebs/openebs-nfs-provisioner-kill/openebs_nfs_provisioner_kill_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
- name: ANSIBLE_STDOUT_CALLBACK
|
||||||
|
value: 'default'
|
||||||
|
|
||||||
|
# NFS default container
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: 'nfs-provisioner'
|
||||||
|
|
||||||
|
# Period to wait before injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# It supports pumba and containerd
|
||||||
|
- name: LIB
|
||||||
|
value: 'pumba'
|
||||||
|
|
||||||
|
# LIB_IMAGE can be - gaiaadm/pumba:0.6.5, gprasath/crictl:ci
|
||||||
|
# For pumba image use: gaiaadm/pumba:0.6.5
|
||||||
|
# For containerd image use: gprasath/crictl:ci
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'gaiaadm/pumba:0.6.5'
|
||||||
|
|
||||||
|
# provide the chaos interval
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
# provide the total chaos duration
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '20'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: openebs-nfs-provisioner-kill
|
||||||
|
configmaps:
|
||||||
|
- name: openebs-nfs-provisioner-kill
|
||||||
|
mountPath: /mnt/
|
@@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: openebs-nfs-provisioner-kill
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: OpenEBS
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.openebs.io/
|
||||||
|
spec:
|
||||||
|
displayName: openebs-nfs-kill-chaos
|
||||||
|
categoryDescription: >
|
||||||
|
Kill the OpenEBS NFS provisioner container and check if pods consuming the NFS PVs continue to be available and volumes are writable (RWM mode)
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- OpenEBS
|
||||||
|
- NFS
|
||||||
|
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-nfs-provisioner-kill
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.litmuschaos.io/docs/openebs-nfs-provisioner-kill/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url: ""
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/openebs/openebs-nfs-provisioner-kill/experiment.yaml
|
34
charts/openebs/openebs-nfs-provisioner-kill/rbac.yaml
Normal file
34
charts/openebs/openebs-nfs-provisioner-kill/rbac.yaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
labels:
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["","apps","litmuschaos.io","batch","extensions","storage.k8s.io"]
|
||||||
|
resources: ["pods","pods/exec","pods/log", "deployments","events","jobs","configmaps","services","persistentvolumeclaims","storageclasses","persistentvolumes","chaosexperiments","chaosresults","chaosengines"]
|
||||||
|
verbs: ["create","list","get","patch","update","delete"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
labels:
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: nfs-chaos-sa
|
||||||
|
namespace: default
|
@@ -38,4 +38,4 @@ spec:
|
|||||||
icon:
|
icon:
|
||||||
- url: ""
|
- url: ""
|
||||||
mediatype: ""
|
mediatype: ""
|
||||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/openebs/openebs-pool-container-failure/experiment.yaml
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/openebs/openebs-pool-container-failure/experiment.yaml
|
@@ -32,4 +32,4 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: pool-container-failure-sa
|
name: pool-container-failure-sa
|
||||||
namespace: default
|
namespace: default
|
Reference in New Issue
Block a user