diff --git a/charts/azure/azure-disk-loss/azure-disk-loss.chartserviceversion.yaml b/charts/azure/azure-disk-loss/azure-disk-loss.chartserviceversion.yaml new file mode 100644 index 0000000..4c2b6b0 --- /dev/null +++ b/charts/azure/azure-disk-loss/azure-disk-loss.chartserviceversion.yaml @@ -0,0 +1,44 @@ +apiVersion: litmuchaos.io/v1alpha1 +kind: ChartServiceVersion +metadata: + name: azure-disk-loss + version: 0.1.0 + annotations: + categories: Azure + vendor: ChaosNative + support: https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN +spec: + displayName: azure-disk-loss + categoryDescription: | + This experiment causes the detachment of the disk from the VM for a certain chaos duration + - Causes detachment of the disk from the VM and then reattachment of the disk to the VM + - It helps to check the performance of the application on the instance. + + keywords: + - Kubernetes + - Azure + - Disk + - AKS + platforms: + - Azure + maturity: alpha + maintainers: + - name: avaakash + email: akash@chaosnative.com + minKubeVersion: 1.12.0 + provider: + name: ChaosNative + 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/azure/disk-loss/experiment + - name: Documentation + url: https://litmuschaos.github.io/litmus/experiments/categories/azure/azure-disk-loss/ + # - name: Video + # url: + icon: + - url: + mediatype: "" + chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/azure/azure-disk-loss/experiment.yaml \ No newline at end of file diff --git a/charts/azure/azure-disk-loss/engine.yaml b/charts/azure/azure-disk-loss/engine.yaml new file mode 100644 index 0000000..18d029f --- /dev/null +++ b/charts/azure/azure-disk-loss/engine.yaml @@ -0,0 +1,32 @@ +apiVersion: litmuschaos.io/v1alpha1 +kind: ChaosEngine +metadata: + name: nginx-chaos +spec: + # It can be active/stop + engineState: 'active' + chaosServiceAccount: azure-disk-loss-sa + experiments: + - name: azure-disk-loss + spec: + components: + env: + # set chaos duration (in sec) as desired + - name: TOTAL_CHAOS_DURATION + value: '30' + + # set chaos interval (in sec) as desired + - name: CHAOS_INTERVAL + value: '30' + + # provide the resource group of the instance + - name: RESOURCE_GROUP + value: '' + + # accepts enable/disable, default is disable + - name: SCALE_SET + value: '' + + # provide the virtual disk names (comma separated if multiple) + - name: VIRTUAL_DISK_NAMES + value: '' \ No newline at end of file diff --git a/charts/azure/azure-disk-loss/experiment.yaml b/charts/azure/azure-disk-loss/experiment.yaml new file mode 100644 index 0000000..181ff8b --- /dev/null +++ b/charts/azure/azure-disk-loss/experiment.yaml @@ -0,0 +1,92 @@ +apiVersion: litmuschaos.io/v1alpha1 +description: + message: | + Detaches disk from the VM and then re-attaches disk to the VM +kind: ChaosExperiment +metadata: + name: azure-disk-loss + labels: + name: azure-disk-loss + app.kubernetes.io/part-of: litmus + app.kubernetes.io/component: chaosexperiment + app.kubernetes.io/version: latest +spec: + definition: + scope: Cluster + permissions: + - apiGroups: + - "" + - "batch" + - "apps" + - "litmuschaos.io" + resources: + - "jobs" + - "pods" + - "pods/log" + - "events" + - "deployments" + - "replicasets" + - "pods/exec" + - "chaosengines" + - "chaosexperiments" + - "chaosresults" + - "secrets" + verbs: + - "create" + - "list" + - "get" + - "patch" + - "update" + - "delete" + - "deletecollection" + image: "litmuschaos/go-runner:latest" + imagePullPolicy: Always + args: + - -c + - ./experiments -name azure-disk-loss + command: + - /bin/bash + env: + + - name: TOTAL_CHAOS_DURATION + value: '30' + + - name: CHAOS_INTERVAL + value: '30' + + - name: LIB + value: 'litmus' + + # Period to wait before and after injection of chaos in sec + - name: RAMP_TIME + value: '' + + # provide the resource group of the instance + - name: RESOURCE_GROUP + value: '' + + # accepts enable/disable, default is disable + - name: SCALE_SET + value: '' + + # provide the virtual disk names (comma separated if multiple) + - name: VIRTUAL_DISK_NAMES + value: '' + + # provide the sequence type for the run. Options: serial/parallel + - name: SEQUENCE + value: 'parallel' + + # provide the path to aks credentials mounted from secret + - name: AZURE_AUTH_LOCATION + value: '/tmp/azure.auth' + + labels: + name: azure-disk-loss + app.kubernetes.io/part-of: litmus + app.kubernetes.io/component: experiment-job + app.kubernetes.io/version: latest + + secrets: + - name: cloud-secret + mountPath: /tmp/ diff --git a/charts/azure/azure-disk-loss/rbac.yaml b/charts/azure/azure-disk-loss/rbac.yaml new file mode 100644 index 0000000..78dc2b2 --- /dev/null +++ b/charts/azure/azure-disk-loss/rbac.yaml @@ -0,0 +1,48 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: azure-disk-loss-sa + namespace: default + labels: + name: azure-disk-loss-sa + app.kubernetes.io/part-of: litmus +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: azure-disk-loss-sa + namespace: default + labels: + name: azure-disk-loss-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: RoleBinding +metadata: + name: azure-disk-loss-sa + namespace: default + labels: + name: azure-disk-loss-sa + app.kubernetes.io/part-of: litmus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: azure-disk-loss-sa +subjects: +- kind: ServiceAccount + name: azure-disk-loss-sa + namespace: default \ No newline at end of file diff --git a/charts/azure/azure-instance-stop/azure-instance-stop.chartserviceversion.yaml b/charts/azure/azure-instance-stop/azure-instance-stop.chartserviceversion.yaml index c5e6884..c101d6b 100644 --- a/charts/azure/azure-instance-stop/azure-instance-stop.chartserviceversion.yaml +++ b/charts/azure/azure-instance-stop/azure-instance-stop.chartserviceversion.yaml @@ -5,8 +5,8 @@ metadata: name: azure-instance-stop version: 0.1.0 annotations: - categories: Kubernetes - vendor: Chaos Native + categories: Azure + vendor: ChaosNative support: https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN spec: displayName: azure-instance-stop @@ -18,6 +18,7 @@ spec: - Kubernetes - Azure - Termination + - AKS platforms: - Azure maturity: alpha @@ -32,11 +33,11 @@ spec: app.kubernetes.io/version: latest links: - name: Source Code - url: https://github.com/litmuschaos/litmus-go/tree/azure/experiments/azure/instance-terminate/experiment + url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/azure/instance-stop/experiment - name: Documentation url: https://litmuschaos.github.io/litmus/experiments/categories/azure/azure-instance-stop/ - - name: Video - url: + # - name: Video + # url: icon: - url: mediatype: "" diff --git a/charts/azure/azure.chartserviceversion.yaml b/charts/azure/azure.chartserviceversion.yaml index 19853f0..03a6552 100644 --- a/charts/azure/azure.chartserviceversion.yaml +++ b/charts/azure/azure.chartserviceversion.yaml @@ -13,6 +13,7 @@ spec: Azure category of chaos experiments causes the disruption of the azure serives for a certain chaos duration. experiments: - azure-instance-stop + - azure-disk-loss keywords: - Azure - Instance diff --git a/charts/azure/azure.package.yaml b/charts/azure/azure.package.yaml index dc94321..904710a 100644 --- a/charts/azure/azure.package.yaml +++ b/charts/azure/azure.package.yaml @@ -3,3 +3,8 @@ experiments: - name: azure-instance-stop CSV: azure-instance-stop.chartserviceversion.yaml desc: "azure-instance-stop" + + - name: azure-disk-loss + CSV: azure-disk-loss.chartserviceversion.yaml + desc: "azure-disk-loss" + diff --git a/charts/azure/icons/azure-disk-loss.png b/charts/azure/icons/azure-disk-loss.png new file mode 100644 index 0000000..5baec5e Binary files /dev/null and b/charts/azure/icons/azure-disk-loss.png differ