GCP VM Disk Loss Charts (#483)
* Added charts for GCP vm-disk-loss experiments Signed-off-by: neelanjan00 <neelanjanmanna@gmail.com>
This commit is contained in:
42
charts/gcp/gcp-vm-disk-loss/engine.yaml
Normal file
42
charts/gcp/gcp-vm-disk-loss/engine.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: gcp-disk-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: gcp-vm-disk-loss-sa
|
||||||
|
experiments:
|
||||||
|
- name: gcp-vm-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'
|
||||||
|
|
||||||
|
# set the GCP project id
|
||||||
|
- name: GCP_PROJECT_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set the disk volume name(s) as comma seperated values
|
||||||
|
# eg. volume1,volume2,...
|
||||||
|
- name: DISK_VOLUME_NAMES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set the disk zone(s) as comma seperated values in the corresponding
|
||||||
|
# order of DISK_VOLUME_NAME
|
||||||
|
# eg. zone1,zone2,...
|
||||||
|
- name: DISK_ZONES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set the device name(s) as comma seperated values in the corresponding
|
||||||
|
# order of DISK_VOLUME_NAME
|
||||||
|
# eg. device1,device2,...
|
||||||
|
- name: DEVICE_NAMES
|
||||||
|
value: ''
|
93
charts/gcp/gcp-vm-disk-loss/experiment.yaml
Normal file
93
charts/gcp/gcp-vm-disk-loss/experiment.yaml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance for a specified duration of time
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-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"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/log"
|
||||||
|
- "events"
|
||||||
|
- "secrets"
|
||||||
|
- "pods/exec"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "create"
|
||||||
|
- "list"
|
||||||
|
- "get"
|
||||||
|
- "patch"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
- "deletecollection"
|
||||||
|
image: "litmuschaos/go-runner:ci"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ./experiments -name gcp-vm-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: ''
|
||||||
|
|
||||||
|
# parallel or serial; determines how chaos is injected
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# set the GCP project id
|
||||||
|
- name: GCP_PROJECT_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set the disk volume name(s) as comma seperated values
|
||||||
|
# eg. volume1,volume2,...
|
||||||
|
- name: DISK_VOLUME_NAMES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set the disk zone(s) as comma seperated values in the corresponding
|
||||||
|
# order of DISK_VOLUME_NAME
|
||||||
|
# eg. zone1,zone2,...
|
||||||
|
- name: DISK_ZONES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# set the device name(s) as comma seperated values in the corresponding
|
||||||
|
# order of DISK_VOLUME_NAME
|
||||||
|
# eg. device1,device2,...
|
||||||
|
- name: DEVICE_NAMES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-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/
|
@@ -0,0 +1,34 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: gcp
|
||||||
|
spec:
|
||||||
|
displayName: gcp-vm-disk-loss
|
||||||
|
categoryDescription: >
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance for a specified duration of time
|
||||||
|
keywords:
|
||||||
|
- "persistent-disks"
|
||||||
|
- "kubernetes"
|
||||||
|
- "gcp"
|
||||||
|
platforms:
|
||||||
|
- "GCP"
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: neelanjan00
|
||||||
|
email: neelanjan@chaosnative.com
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: ChaosNative
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: chartserviceversion
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
links:
|
||||||
|
- name: Documentation
|
||||||
|
url: https://docs.litmuschaos.io/docs/getstarted/
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/gcp/gcp-vm-disk-loss/experiment.yaml
|
46
charts/gcp/gcp-vm-disk-loss/rbac.yaml
Normal file
46
charts/gcp/gcp-vm-disk-loss/rbac.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-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: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gcp-vm-disk-loss-sa
|
||||||
|
namespace: default
|
@@ -63,7 +63,7 @@ spec:
|
|||||||
|
|
||||||
# period to wait before and after injection of chaos in sec
|
# period to wait before and after injection of chaos in sec
|
||||||
- name: RAMP_TIME
|
- name: RAMP_TIME
|
||||||
value: '0'
|
value: ''
|
||||||
|
|
||||||
# enable or disable; shall be enabled if the target instance is a part of an auto scaling group.
|
# enable or disable; shall be enabled if the target instance is a part of an auto scaling group.
|
||||||
- name: AUTO_SCALING_GROUP
|
- name: AUTO_SCALING_GROUP
|
||||||
|
@@ -14,7 +14,7 @@ spec:
|
|||||||
- "kubernetes"
|
- "kubernetes"
|
||||||
- "gcp"
|
- "gcp"
|
||||||
platforms:
|
platforms:
|
||||||
- "GKE"
|
- "GCP"
|
||||||
maturity: alpha
|
maturity: alpha
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: neelanjan00
|
- name: neelanjan00
|
||||||
|
@@ -11,9 +11,11 @@ spec:
|
|||||||
GCP contains chaos to disrupt state of gcp resources running part of the gcp services
|
GCP contains chaos to disrupt state of gcp resources running part of the gcp services
|
||||||
experiments:
|
experiments:
|
||||||
- gcp-vm-instance-stop
|
- gcp-vm-instance-stop
|
||||||
|
- gcp-vm-disk-loss
|
||||||
keywords:
|
keywords:
|
||||||
- "pods"
|
- "pods"
|
||||||
- "kubernetes"
|
- "kubernetes"
|
||||||
|
- "disk"
|
||||||
- "gcp"
|
- "gcp"
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: neelanjan00
|
- name: neelanjan00
|
||||||
|
@@ -3,3 +3,6 @@ experiments:
|
|||||||
- name: gcp-vm-instance-stop
|
- name: gcp-vm-instance-stop
|
||||||
CSV: gcp-vm-instance-stop.chartserviceversion.yaml
|
CSV: gcp-vm-instance-stop.chartserviceversion.yaml
|
||||||
desc: "gcp-vm-instance-stop"
|
desc: "gcp-vm-instance-stop"
|
||||||
|
- name: gcp-vm-disk-loss
|
||||||
|
CSV: gcp-vm-disk-loss.chartserviceversion.yaml
|
||||||
|
desc: "gcp-vm-disk-loss"
|
||||||
|
BIN
charts/gcp/icons/gcp-vm-disk-loss.png
Normal file
BIN
charts/gcp/icons/gcp-vm-disk-loss.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
Reference in New Issue
Block a user