Skip to content

Commit

Permalink
2320144046: version upgraded for chaos-charts
Browse files Browse the repository at this point in the history
  • Loading branch information
litmusbot committed May 13, 2022
1 parent e07a86b commit 5b2e2d8
Showing 1 changed file with 181 additions and 18 deletions.
199 changes: 181 additions & 18 deletions charts/gcp/experiments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ spec:
# Track and get the runner, experiment, and helper pods log
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get","list","watch"]
# for creating and managing to execute comands inside target container
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["get","list","create"]
verbs: ["get","list","watch"]
# for configuring and monitor the experiment job by the chaos-runner pod
- apiGroups: ["batch"]
resources: ["jobs"]
Expand Down Expand Up @@ -74,8 +70,8 @@ spec:
- name: RAMP_TIME
value: ''

# enable or disable; shall be enabled if the target instance is a part of an auto scaling group.
- name: AUTO_SCALING_GROUP
# enable or disable; shall be set to enable if the target instances are a part of a managed instance group
- name: MANAGED_INSTANCE_GROUP
value: 'disable'

# Instance name of the target vm instance(s)
Expand All @@ -102,6 +98,183 @@ spec:
- name: cloud-secret
mountPath: /tmp/

---
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
gcp vm disk loss by label experiment detaches the target persistent disk volumes by label for a fixed duration of time
kind: ChaosExperiment
metadata:
name: gcp-vm-disk-loss-by-label
labels:
name: gcp-vm-disk-loss-by-label
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: chaosexperiment
app.kubernetes.io/version: 2.9.0
spec:
definition:
scope: Cluster
permissions:
# Create and monitor the experiment & helper pods
- apiGroups: [""]
resources: ["pods"]
verbs: ["create","delete","get","list","patch","update", "deletecollection"]
# Performs CRUD operations on the events inside chaosengine and chaosresult
- apiGroups: [""]
resources: ["events"]
verbs: ["create","get","list","patch","update"]
# Fetch configmaps & secrets details and mount it to the experiment pod (if specified)
- apiGroups: [""]
resources: ["secrets","configmaps"]
verbs: ["get","list",]
# Track and get the runner, experiment, and helper pods log
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get","list","watch"]
# for configuring and monitor the experiment job by the chaos-runner pod
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create","list","get","delete","deletecollection"]
# for creation, status polling and deletion of litmus chaos resources used within a chaos workflow
- apiGroups: ["litmuschaos.io"]
resources: ["chaosengines","chaosexperiments","chaosresults"]
verbs: ["create","list","get","patch","update","delete"]
image: "litmuschaos/go-runner:latest"
imagePullPolicy: Always
args:
- -c
- ./experiments -name gcp-vm-disk-loss-by-label
command:
- /bin/bash
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 zone in which all the disks are created
# all the disks must exist in the same zone
- name: DISK_ZONES
value: ''

# set the label of the target disk volumes
- name: DISK_VOLUME_LABEL
value: ''

# set the percentage value of the disks with the given label
# which should be targeted as part of the chaos injection
- name: DISK_AFFECTED_PERC
value: ''

labels:
name: gcp-vm-disk-loss-by-label
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: experiment-job
app.kubernetes.io/version: 2.9.0
secrets:
- name: cloud-secret
mountPath: /tmp/

---
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
gcp-vm-instance stop by label experiment causes gcp vm instances specified by a label to be stopped for a given time duration
kind: ChaosExperiment
metadata:
name: gcp-vm-instance-stop-by-label
labels:
name: gcp-vm-instance-stop-by-label
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: chaosexperiment
app.kubernetes.io/version: 2.9.0
spec:
definition:
scope: Cluster
permissions:
# Create and monitor the experiment & helper pods
- apiGroups: [""]
resources: ["pods"]
verbs: ["create","delete","get","list","patch","update", "deletecollection"]
# Performs CRUD operations on the events inside chaosengine and chaosresult
- apiGroups: [""]
resources: ["events"]
verbs: ["create","get","list","patch","update"]
# Fetch configmaps & secrets details and mount it to the experiment pod (if specified)
- apiGroups: [""]
resources: ["secrets","configmaps"]
verbs: ["get","list",]
# Track and get the runner, experiment, and helper pods log
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get","list","watch"]
# for configuring and monitor the experiment job by the chaos-runner pod
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create","list","get","delete","deletecollection"]
# for creation, status polling and deletion of litmus chaos resources used within a chaos workflow
- apiGroups: ["litmuschaos.io"]
resources: ["chaosengines","chaosexperiments","chaosresults"]
verbs: ["create","list","get","patch","update","delete"]
# for experiment to perform node status checks
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get","list"]
image: "litmuschaos/go-runner:latest"
imagePullPolicy: Always
args:
- -c
- ./experiments -name gcp-vm-instance-stop-by-label
command:
- /bin/bash
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'

- name: SEQUENCE
value: 'parallel'

# GCP project ID to which the vm instances belong
- name: GCP_PROJECT_ID
value: ''

# Label of the target vm instance(s)
- name: INSTANCE_LABEL
value: ''

# Zone in which the target vm instance(s) filtered by the label exist
# all the instances should lie in a single zone
- name: INSTANCE_ZONES
value: ''

# enable it if the target instance is a part of a managed instance group
- name: MANAGED_INSTANCE_GROUP
value: 'disable'

labels:
name: gcp-vm-instance-stop-by-label
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: experiment-job
app.kubernetes.io/version: 2.9.0

secrets:
- name: cloud-secret
mountPath: /tmp/

---
apiVersion: litmuschaos.io/v1alpha1
description:
Expand Down Expand Up @@ -134,11 +307,7 @@ spec:
# Track and get the runner, experiment, and helper pods log
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get","list","watch"]
# for creating and managing to execute comands inside target container
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["get","list","create"]
verbs: ["get","list","watch"]
# for configuring and monitor the experiment job by the chaos-runner pod
- apiGroups: ["batch"]
resources: ["jobs"]
Expand Down Expand Up @@ -187,12 +356,6 @@ spec:
# 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
Expand Down

0 comments on commit 5b2e2d8

Please sign in to comment.