diff --git a/charts/openebs/icons/openebs-nfs-provisioner-kill.png b/charts/openebs/icons/openebs-nfs-provisioner-kill.png new file mode 100644 index 0000000..db1d3e7 Binary files /dev/null and b/charts/openebs/icons/openebs-nfs-provisioner-kill.png differ diff --git a/charts/openebs/openebs-nfs-provisioner-kill/engine.yaml b/charts/openebs/openebs-nfs-provisioner-kill/engine.yaml new file mode 100644 index 0000000..a0cd960 --- /dev/null +++ b/charts/openebs/openebs-nfs-provisioner-kill/engine.yaml @@ -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' \ No newline at end of file diff --git a/charts/openebs/openebs-nfs-provisioner-kill/experiment.yaml b/charts/openebs/openebs-nfs-provisioner-kill/experiment.yaml new file mode 100644 index 0000000..abf0c9d --- /dev/null +++ b/charts/openebs/openebs-nfs-provisioner-kill/experiment.yaml @@ -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/ \ No newline at end of file diff --git a/charts/openebs/openebs-nfs-provisioner-kill/openebs-nfs-provisioner-kill-chaos.chartserviceversion.yaml b/charts/openebs/openebs-nfs-provisioner-kill/openebs-nfs-provisioner-kill-chaos.chartserviceversion.yaml new file mode 100644 index 0000000..091c898 --- /dev/null +++ b/charts/openebs/openebs-nfs-provisioner-kill/openebs-nfs-provisioner-kill-chaos.chartserviceversion.yaml @@ -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 \ No newline at end of file diff --git a/charts/openebs/openebs-nfs-provisioner-kill/rbac.yaml b/charts/openebs/openebs-nfs-provisioner-kill/rbac.yaml new file mode 100644 index 0000000..e0c805f --- /dev/null +++ b/charts/openebs/openebs-nfs-provisioner-kill/rbac.yaml @@ -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 diff --git a/charts/openebs/openebs-pool-container-failure/openebs-pool-container-failure.chartserviceversion.yaml b/charts/openebs/openebs-pool-container-failure/openebs-pool-container-failure.chartserviceversion.yaml index d08ef2f..b1531d3 100644 --- a/charts/openebs/openebs-pool-container-failure/openebs-pool-container-failure.chartserviceversion.yaml +++ b/charts/openebs/openebs-pool-container-failure/openebs-pool-container-failure.chartserviceversion.yaml @@ -38,4 +38,4 @@ spec: icon: - url: "" 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 \ No newline at end of file diff --git a/charts/openebs/openebs-pool-container-failure/rbac.yaml b/charts/openebs/openebs-pool-container-failure/rbac.yaml index 9c9a95f..76b2d4a 100644 --- a/charts/openebs/openebs-pool-container-failure/rbac.yaml +++ b/charts/openebs/openebs-pool-container-failure/rbac.yaml @@ -32,4 +32,4 @@ roleRef: subjects: - kind: ServiceAccount name: pool-container-failure-sa - namespace: default + namespace: default \ No newline at end of file