From 540b208651bf6b91ae81bb69d63c953027e0c4eb Mon Sep 17 00:00:00 2001 From: Shubham Chaudhary Date: Mon, 11 Nov 2019 20:41:37 +0530 Subject: [PATCH] (feat) add openebs-target-container-failure experiment CR (#45) * (feat): add openebs target container failure chart Signed-off-by: shubhamchaudhary * (feat): add openebs target container failure Signed-off-by: shubhamchaudhary --- .../experiment.yaml | 92 +++++++++++++++++++ ...ontainer-failure.chartserviceversion.yaml} | 13 ++- .../openebs-target-failure/experiment.yaml | 38 -------- 3 files changed, 100 insertions(+), 43 deletions(-) create mode 100644 charts/openebs/openebs-target-container-failure/experiment.yaml rename charts/openebs/{openebs-target-failure/openebs-target-failure.chartserviceversion.yaml => openebs-target-container-failure/openebs-target-container-failure.chartserviceversion.yaml} (69%) delete mode 100644 charts/openebs/openebs-target-failure/experiment.yaml diff --git a/charts/openebs/openebs-target-container-failure/experiment.yaml b/charts/openebs/openebs-target-container-failure/experiment.yaml new file mode 100644 index 0000000..5317ae3 --- /dev/null +++ b/charts/openebs/openebs-target-container-failure/experiment.yaml @@ -0,0 +1,92 @@ +--- +apiVersion: litmuschaos.io/v1alpha1 +description: + message: | + Kill the cstor target/Jiva controller container and check if gets created again +kind: ChaosExperiment +metadata: + labels: + litmuschaos.io/name: openebs + name: openebs-target-container-failure + version: 0.1.1 +spec: + definition: + permissions: + apiGroups: + - "" + - "extensions" + - "apps" + - "batch" + - "litmuschaos.io" + - "openebs.io" + - "storage.k8s.io" + resources: + - "daemonsets" + - "statefulsets" + - "deployments" + - "replicasets" + - "jobs" + - "pods" + - "pods/exec" + - "chaosengines" + - "chaosexperiments" + - "chaosresults" + - "persistentvolumeclaims" + - "storageclasses" + - "persistentvolumes" + verbs: + - "*" + image: "litmuschaos/ansible-runner:ci" + args: + - -c + - ansible-playbook ./experiments/openebs/openebs-target-container-failure/openebs_target_container_failure_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0 + command: + - /bin/bash + env: + - name: ANSIBLE_STDOUT_CALLBACK + value: 'default' + + - name: OPENEBS_NAMESPACE + value: 'openebs' + + - name: APP_PVC + value: '' + + # LIB_IMAGE can be - gaiaadm/pumba:0.4.8, gprasath/crictl:ci + # For pumba image use : gaiaadm/pumba:0.4.8 + # For containerd image use : gprasath/crictl:ci + - name: LIB_IMAGE + value: 'gaiaadm/pumba:0.4.8' + + # Specify the container runtime used , to pick the relevant chaos util + - name: CONTAINER_RUNTIME + value: 'docker' + + # TARGET_CONTAINER values: cstor-volume-mgmt , cstor-istgt + # For cstor-volume-istgt container kill use : cstor-istgt + # For volume-mgmt-kill container use : cstor-volume-mgmt + + - name: TARGET_CONTAINER + value: 'cstor-volume-mgmt' + + - name: FORCE + value: 'true' + + - name: LIVENESS_APP_LABEL + value: '' + + - name: LIVENESS_APP_NAMESPACE + value: '' + + - name: DATA_PERSISTENCE + value: '' + + - name: DEPLOY_TYPE + value: 'deployment' + + labels: + name: openebs-target-container-failure + configmaps: + - name: openebs-target-container-failure + data: + parameters.yml: | \ No newline at end of file diff --git a/charts/openebs/openebs-target-failure/openebs-target-failure.chartserviceversion.yaml b/charts/openebs/openebs-target-container-failure/openebs-target-container-failure.chartserviceversion.yaml similarity index 69% rename from charts/openebs/openebs-target-failure/openebs-target-failure.chartserviceversion.yaml rename to charts/openebs/openebs-target-container-failure/openebs-target-container-failure.chartserviceversion.yaml index 4824950..c798476 100644 --- a/charts/openebs/openebs-target-failure/openebs-target-failure.chartserviceversion.yaml +++ b/charts/openebs/openebs-target-container-failure/openebs-target-container-failure.chartserviceversion.yaml @@ -1,21 +1,24 @@ apiVersion: litmuchaos.io/v1alpha1 kind: ChartServiceVersion metadata: - name: openebs-target-failure - version: 0.1.2 + name: openebs-target-container-failure + version: 0.1.1 annotations: categories: OpenEBS vendor: CNCF repository: https://github.com/litmuschaos/chaos-charts support: https://slack.openebs.io/ spec: - displayName: openebs-target-failure + displayName: openebs-target-container-failure categoryDescription: > Kill the cstor target/Jiva controller container and check if gets created again keywords: - Kubernetes - Storage Controller - OpenEBS + platforms: + - GKE + - OpenShift maturity: alpha maintainers: - name: shubham chaudhary @@ -23,7 +26,7 @@ spec: minKubeVersion: 1.12.0 provider: name: Mayadata - readme: "https://github.com/mayadata-io/litmus/blob/master/experiments/chaos/openebs_target_failure/README.md" + readme: "https://github.com/litmuschaos/litmus/blob/master/experiments/openebs/openebs-target-container-failure/README.md" links: - name: OpenEBS Website url: https://openebs.io @@ -32,4 +35,4 @@ spec: icon: - url: "" mediatype: "" - chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/openebs/openebs-target-failure/experiment.yaml + chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/openebs/openebs-target-container-failure/experiment.yaml diff --git a/charts/openebs/openebs-target-failure/experiment.yaml b/charts/openebs/openebs-target-failure/experiment.yaml deleted file mode 100644 index d3d8a26..0000000 --- a/charts/openebs/openebs-target-failure/experiment.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -apiVersion: litmuschaos.io/v1alpha1 -description: - message: | - Kill the cstor target/Jiva controller container and check if gets created again -kind: ChaosExperiment -metadata: - labels: - litmuschaos.io/name: openebs - name: openebs-target-failure - version: 0.1.1 -spec: - definition: - image: "openebs/ansible-runner:ci" - args: - - -c - - ansible-playbook ./experiments/chaos/openebs_target_failure/test.yml -i /etc/ansible/hosts -vv; exit 0 - command: - - /bin/bash - env: - - name: ANSIBLE_STDOUT_CALLBACK - value: default - - name: TARGET_NAMESPACE - value: "openebs" - - name: DATA_PERSISTENCE - value: "" - - name: CHAOS_TYPE - value: "target-zrepl-kill" - - name: TARGET_CONTAINER - value: "cstor-volume-mgmt" - - name: DEPLOY_TYPE - value: "deployment" - labels: - name: openebs-target-failure - configmaps: - - name: target-failure - data: - parameters.yml: | \ No newline at end of file