Directory restructure to add scenarios and experiments (#559)
* Updated dir struture with scenarios and experiments dir Signed-off-by: Amit Kumar Das <amit.das@harness.io> * Added icons Signed-off-by: Amit Kumar Das <amit.das@harness.io>
@@ -0,0 +1,43 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2021-06-10T10:28:08Z
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.kubernetes.io/
|
||||||
|
spec:
|
||||||
|
displayName: aws-ssm-chaos-by-id
|
||||||
|
categoryDescription: |
|
||||||
|
AWS SSM Chaos By ID contains chaos to disrupt the state of infra resources. The experiment can induce chaos on AWS resources using Amazon SSM Run Command This is carried out by using SSM Docs that defines the actions performed by Systems Manager on your managed instances (having SSM agent installed) which let us perform chaos experiments on resources.
|
||||||
|
- Causes chaos on AWS ec2 instances with given instance ID(s) using SSM docs for total chaos duration with the specified chaos interval.
|
||||||
|
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the target application pod(if provided).
|
||||||
|
keywords:
|
||||||
|
- SSM
|
||||||
|
- AWS
|
||||||
|
- EC2
|
||||||
|
platforms:
|
||||||
|
- AWS
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: Udit Gaurav
|
||||||
|
email: udit@chaosnative.com
|
||||||
|
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/aws-ssm/aws-ssm-chaos-by-id
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/aws-ssm/aws-ssm-chaos-by-id/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/aws-ssm/aws-ssm-chaos-by-id/experiment.yaml
|
62
experiments/aws-ssm/aws-ssm-chaos-by-id/engine.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: aws-ssm-chaos-by-id-sa
|
||||||
|
experiments:
|
||||||
|
- name: aws-ssm-chaos-by-id
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Instance ID of the target ec2 instance
|
||||||
|
# Multiple IDs can also be provided as comma separated values ex: id1,id2
|
||||||
|
- name: EC2_INSTANCE_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the region name of the target instances
|
||||||
|
- name: REGION
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the percentage of available memory to stress
|
||||||
|
- name: MEMORY_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
# provide the CPU chores to be comsumed
|
||||||
|
# 0 will consume all the available cpu cores
|
||||||
|
- name: CPU_CORE
|
||||||
|
value: '0'
|
||||||
|
|
||||||
|
# Provide the name of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the type of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_TYPE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the format of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_FORMAT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_PATH
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# if you want to install dependencies to run default ssm docs
|
||||||
|
- name: INSTALL_DEPENDENCIES
|
||||||
|
value: 'True'
|
129
experiments/aws-ssm/aws-ssm-chaos-by-id/experiment.yaml
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Execute AWS SSM Chaos on given ec2 instance IDs
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 aws-ssm-chaos-by-id
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Instance ID of the target ec2 instance
|
||||||
|
# Multiple IDs can also be provided as comma separated values ex: id1,id2
|
||||||
|
- name: EC2_INSTANCE_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: REGION
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# it defines the sequence of chaos execution for multiple target instances
|
||||||
|
# supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# Provide the path of aws credentials mounted from secret
|
||||||
|
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||||
|
value: '/tmp/cloud_config.yml'
|
||||||
|
|
||||||
|
# Provide the name of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the type of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_TYPE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the format of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_FORMAT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_PATH
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# if you want to install dependencies to run default ssm docs
|
||||||
|
- name: INSTALL_DEPENDENCIES
|
||||||
|
value: 'True'
|
||||||
|
|
||||||
|
# provide the number of workers for memory stress
|
||||||
|
- name: NUMBER_OF_WORKERS
|
||||||
|
value: '1'
|
||||||
|
|
||||||
|
# provide the percentage of available memory to stress
|
||||||
|
- name: MEMORY_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
# provide the CPU chores to be comsumed
|
||||||
|
# 0 will consume all the available cpu cores
|
||||||
|
- name: CPU_CORE
|
||||||
|
value: '0'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
62
experiments/aws-ssm/aws-ssm-chaos-by-id/rbac.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: aws-ssm-chaos-by-id-sa
|
||||||
|
namespace: default
|
@@ -0,0 +1,43 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2021-06-10T10:28:08Z
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.kubernetes.io/
|
||||||
|
spec:
|
||||||
|
displayName: aws-ssm-chaos-by-tag
|
||||||
|
categoryDescription: |
|
||||||
|
AWS SSM Chaos By ID contains chaos to disrupt the state of infra resources. The experiment can induce chaos on AWS resources using Amazon SSM Run Command This is carried out by using SSM Docs that defines the actions performed by Systems Manager on your managed instances (having SSM agent installed) which let us perform chaos experiments on resources.
|
||||||
|
- Causes chaos on AWS ec2 instances with given instance tag using SSM docs for total chaos duration with the specified chaos interval.
|
||||||
|
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the target application pod(if provided).
|
||||||
|
keywords:
|
||||||
|
- SSM
|
||||||
|
- AWS
|
||||||
|
- EC2
|
||||||
|
platforms:
|
||||||
|
- AWS
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: Udit Gaurav
|
||||||
|
email: udit@chaosnative.com
|
||||||
|
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/aws-ssm/aws-ssm-chaos-by-tag
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/aws-ssm/aws-ssm-chaos-by-tag/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/aws-ssm/aws-ssm-chaos-by-tag/experiment.yaml
|
62
experiments/aws-ssm/aws-ssm-chaos-by-tag/engine.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: aws-ssm-chaos-by-tag-sa
|
||||||
|
experiments:
|
||||||
|
- name: aws-ssm-chaos-by-tag
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# provide tag of the target ec2 instances
|
||||||
|
# ex: team:devops (key:value)
|
||||||
|
- name: EC2_INSTANCE_TAG
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the region name of the target instances
|
||||||
|
- name: REGION
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the percentage of available memory to stress
|
||||||
|
- name: MEMORY_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
# provide the CPU chores to comsumed
|
||||||
|
# 0 will consume all the available cpu cores
|
||||||
|
- name: CPU_CORE
|
||||||
|
value: '0'
|
||||||
|
|
||||||
|
# Provide the name of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the type of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_TYPE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the format of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_FORMAT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_PATH
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# if you want to install dependencies to run default ssm docs
|
||||||
|
- name: INSTALL_DEPENDENCIES
|
||||||
|
value: 'True'
|
133
experiments/aws-ssm/aws-ssm-chaos-by-tag/experiment.yaml
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Execute AWS SSM Chaos on given ec2 instance Tag
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 aws-ssm-chaos-by-tag
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide tag of the target ec2 instances
|
||||||
|
# ex: team:devops (key:value)
|
||||||
|
- name: EC2_INSTANCE_TAG
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: REGION
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# it defines the sequence of chaos execution for multiple target instances
|
||||||
|
# supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# Provide the path of aws credentials mounted from secret
|
||||||
|
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||||
|
value: '/tmp/cloud_config.yml'
|
||||||
|
|
||||||
|
# percentage of total instance to target
|
||||||
|
- name: INSTANCE_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the name of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the type of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_TYPE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the format of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_FORMAT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_PATH
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# if you want to install dependencies to run default ssm docs
|
||||||
|
- name: INSTALL_DEPENDENCIES
|
||||||
|
value: 'True'
|
||||||
|
|
||||||
|
# provide the number of workers for memory stress
|
||||||
|
- name: NUMBER_OF_WORKERS
|
||||||
|
value: '1'
|
||||||
|
|
||||||
|
# provide the percentage of available memory to stress
|
||||||
|
- name: MEMORY_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
# provide the CPU chores to comsumed
|
||||||
|
# 0 will consume all the available cpu cores
|
||||||
|
- name: CPU_CORE
|
||||||
|
value: '0'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
62
experiments/aws-ssm/aws-ssm-chaos-by-tag/rbac.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: aws-ssm-chaos-by-tag-sa
|
||||||
|
namespace: default
|
38
experiments/aws-ssm/aws-ssm.chartserviceversion.yaml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2021-06-11T10:28:08Z
|
||||||
|
name: aws-ssm
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
chartDescription: Injects aws ssm chaos
|
||||||
|
spec:
|
||||||
|
displayName: AWS SSM
|
||||||
|
categoryDescription: >
|
||||||
|
aws ssm contains chaos to disrupt state of aws resources by litmus aws ssm docs
|
||||||
|
experiments:
|
||||||
|
- name: aws-ssm-chaos-by-id
|
||||||
|
description: ""
|
||||||
|
- name: aws-ssm-chaos-by-tag
|
||||||
|
description: ""
|
||||||
|
keywords:
|
||||||
|
- AWS
|
||||||
|
- SSM
|
||||||
|
- EC2
|
||||||
|
maintainers:
|
||||||
|
- name: ksatchit
|
||||||
|
email: karthik@chaosnative.com
|
||||||
|
provider:
|
||||||
|
name: ChaosNative
|
||||||
|
links:
|
||||||
|
- name: Kubernetes Website
|
||||||
|
url: https://kubernetes.io
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/litmuschaos/litmus-go/tree/master/experiments/aws-ssm
|
||||||
|
- name: Kubernetes Slack
|
||||||
|
url: https://slack.kubernetes.io/
|
||||||
|
icon:
|
||||||
|
- url: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/aws-ssm/icons/aws-ssm.png
|
||||||
|
mediatype: image/png
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/aws-ssm/experiments.yaml
|
8
experiments/aws-ssm/aws-ssm.package.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
packageName: aws-ssm
|
||||||
|
experiments:
|
||||||
|
- name: aws-ssm-chaos-by-id
|
||||||
|
CSV: aws-ssm-chaos-by-id.chartserviceversion.yaml
|
||||||
|
desc: "aws-ssm-chaos-by-id"
|
||||||
|
- name: aws-ssm-chaos-by-tag
|
||||||
|
CSV: aws-ssm-chaos-by-tag.chartserviceversion.yaml
|
||||||
|
desc: "aws-ssm-chaos-by-tag"
|
266
experiments/aws-ssm/experiments.yaml
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Execute AWS SSM Chaos on given ec2 instance IDs
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 aws-ssm-chaos-by-id
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Instance ID of the target ec2 instance
|
||||||
|
# Multiple IDs can also be provided as comma separated values ex: id1,id2
|
||||||
|
- name: EC2_INSTANCE_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: REGION
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# it defines the sequence of chaos execution for multiple target instances
|
||||||
|
# supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# Provide the path of aws credentials mounted from secret
|
||||||
|
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||||
|
value: '/tmp/cloud_config.yml'
|
||||||
|
|
||||||
|
# Provide the name of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the type of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_TYPE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the format of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_FORMAT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_PATH
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# if you want to install dependencies to run default ssm docs
|
||||||
|
- name: INSTALL_DEPENDENCIES
|
||||||
|
value: 'True'
|
||||||
|
|
||||||
|
# provide the number of workers for memory stress
|
||||||
|
- name: NUMBER_OF_WORKERS
|
||||||
|
value: '1'
|
||||||
|
|
||||||
|
# provide the percentage of available memory to stress
|
||||||
|
- name: MEMORY_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
# provide the CPU chores to be comsumed
|
||||||
|
# 0 will consume all the available cpu cores
|
||||||
|
- name: CPU_CORE
|
||||||
|
value: '0'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-id
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Execute AWS SSM Chaos on given ec2 instance Tag
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 aws-ssm-chaos-by-tag
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide tag of the target ec2 instances
|
||||||
|
# ex: team:devops (key:value)
|
||||||
|
- name: EC2_INSTANCE_TAG
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: REGION
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# it defines the sequence of chaos execution for multiple target instances
|
||||||
|
# supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# Provide the path of aws credentials mounted from secret
|
||||||
|
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||||
|
value: '/tmp/cloud_config.yml'
|
||||||
|
|
||||||
|
# percentage of total instance to target
|
||||||
|
- name: INSTANCE_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the name of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the type of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_TYPE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the format of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_FORMAT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of ssm doc
|
||||||
|
# if not using the default stress docs
|
||||||
|
- name: DOCUMENT_PATH
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# if you want to install dependencies to run default ssm docs
|
||||||
|
- name: INSTALL_DEPENDENCIES
|
||||||
|
value: 'True'
|
||||||
|
|
||||||
|
# provide the number of workers for memory stress
|
||||||
|
- name: NUMBER_OF_WORKERS
|
||||||
|
value: '1'
|
||||||
|
|
||||||
|
# provide the percentage of available memory to stress
|
||||||
|
- name: MEMORY_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
# provide the CPU chores to comsumed
|
||||||
|
# 0 will consume all the available cpu cores
|
||||||
|
- name: CPU_CORE
|
||||||
|
value: '0'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: aws-ssm-chaos-by-tag
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
||||||
|
---
|
BIN
experiments/aws-ssm/icons/aws-ssm-chaos-by-id.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
experiments/aws-ssm/icons/aws-ssm-chaos-by-tag.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
experiments/aws-ssm/icons/aws-ssm.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,42 @@
|
|||||||
|
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:
|
||||||
|
- 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
|
32
experiments/azure/azure-disk-loss/engine.yaml
Normal file
@@ -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: ''
|
95
experiments/azure/azure-disk-loss/experiment.yaml
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
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:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 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/
|
64
experiments/azure/azure-disk-loss/rbac.yaml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
---
|
||||||
|
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:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
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
|
@@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2021-02-20T10:28:08Z
|
||||||
|
name: azure-instance-stop
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Azure
|
||||||
|
vendor: ChaosNative
|
||||||
|
support: https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN
|
||||||
|
spec:
|
||||||
|
displayName: azure-instance-stop
|
||||||
|
categoryDescription: |
|
||||||
|
This experiment causes the power off of an azure instance for a certain chaos duration.
|
||||||
|
- Causes termination of an azure instance before bringing it back to running state after the specified chaos duration.
|
||||||
|
- It helps to check the performance of the application on the instance.
|
||||||
|
keywords:
|
||||||
|
- Azure
|
||||||
|
- Scaleset
|
||||||
|
- AKS
|
||||||
|
platforms:
|
||||||
|
- Azure
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: Udit Gaurav
|
||||||
|
email: udit@chaosnative.com
|
||||||
|
provider:
|
||||||
|
name: Chaos Native
|
||||||
|
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/instance-stop/experiment
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/azure/azure-instance-stop/
|
||||||
|
# - name: Video
|
||||||
|
# url:
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/azure/azure-instance-stop/experiment.yaml
|
||||||
|
|
33
experiments/azure/azure-instance-stop/engine.yaml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: azure-instance-stop-sa
|
||||||
|
experiments:
|
||||||
|
- name: azure-instance-stop
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# set chaos intreval (in sec) as desired
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# provide the target instance name(s) (comma separated if multiple)
|
||||||
|
- name: AZURE_INSTANCE_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the resource group of the instance
|
||||||
|
- name: RESOURCE_GROUP
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# accepts enable/disable, default is disable
|
||||||
|
- name: SCALE_SET
|
||||||
|
value: ''
|
||||||
|
|
96
experiments/azure/azure-instance-stop/experiment.yaml
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Terminating azure VM instance
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: azure-instance-stop
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 azure-instance-stop
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the target instance name(s) (comma separated if multiple)
|
||||||
|
- name: AZURE_INSTANCE_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the resource group of the instance
|
||||||
|
- name: RESOURCE_GROUP
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# accepts enable/disable, default is disable
|
||||||
|
- name: SCALE_SET
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of aks credentials mounted from secret
|
||||||
|
- name: AZURE_AUTH_LOCATION
|
||||||
|
value: '/tmp/azure.auth'
|
||||||
|
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
62
experiments/azure/azure-instance-stop/rbac.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: azure-instance-stop-sa
|
||||||
|
namespace: default
|
41
experiments/azure/azure.chartserviceversion.yaml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2021-02-20T10:28:08Z
|
||||||
|
name: azure
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
chartDescription: Injects chaos on azure servies
|
||||||
|
spec:
|
||||||
|
displayName: Azure
|
||||||
|
categoryDescription: >
|
||||||
|
Azure category of chaos experiments causes the disruption of the azure serives for a certain chaos duration.
|
||||||
|
experiments:
|
||||||
|
- name: azure-instance-stop
|
||||||
|
description: ""
|
||||||
|
- name: azure-disk-loss
|
||||||
|
description: ""
|
||||||
|
keywords:
|
||||||
|
- Azure
|
||||||
|
- Instance
|
||||||
|
- AKS
|
||||||
|
- Scaleset
|
||||||
|
maintainers:
|
||||||
|
- name: Udit Gaurav
|
||||||
|
email: udit.gaurav@mayadata.io
|
||||||
|
provider:
|
||||||
|
name: Chaos Native
|
||||||
|
links:
|
||||||
|
- name: Kubernetes Website
|
||||||
|
url: https://kubernetes.io
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/litmuschaos/litmus-go/tree/azure/experiments/azure
|
||||||
|
- name: Kubernetes Slack
|
||||||
|
url: https://slack.kubernetes.io/
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/contents/#cloud-infrastructure
|
||||||
|
icon:
|
||||||
|
- url: https://raw.githubusercontent.com/litmuschaos/charthub.litmuschaos.io/master/public/litmus.ico
|
||||||
|
mediatype: image/png
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/azure/experiments.yaml
|
10
experiments/azure/azure.package.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
packageName: azure
|
||||||
|
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"
|
||||||
|
|
195
experiments/azure/experiments.yaml
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Terminating azure VM instance
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: azure-instance-stop
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 azure-instance-stop
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the target instance name(s) (comma separated if multiple)
|
||||||
|
- name: AZURE_INSTANCE_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the resource group of the instance
|
||||||
|
- name: RESOURCE_GROUP
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# accepts enable/disable, default is disable
|
||||||
|
- name: SCALE_SET
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the path of aks credentials mounted from secret
|
||||||
|
- name: AZURE_AUTH_LOCATION
|
||||||
|
value: '/tmp/azure.auth'
|
||||||
|
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: azure-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
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:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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 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/
|
||||||
|
|
||||||
|
---
|
BIN
experiments/azure/icons/azure-disk-loss.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
experiments/azure/icons/azure-instance-stop.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
experiments/azure/icons/azure.png
Normal file
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2020-04-14T10:28:08Z
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
version: 0.1.3
|
||||||
|
annotations:
|
||||||
|
categories: Cassandra
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://cassandra-slack.herokuapp.com
|
||||||
|
spec:
|
||||||
|
displayName: cassandra-pod-delete
|
||||||
|
categoryDescription: |
|
||||||
|
This experiment causes (forced/graceful) pod failure of random replicas of an cassandra statefulset.
|
||||||
|
It tests statefulset sanity (replica availability & uninterrupted service) and recovery workflows of the cassandra pod
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Cassandra
|
||||||
|
- Pod
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- Konvoy
|
||||||
|
- Packet(Kubeadm)
|
||||||
|
- Minikube
|
||||||
|
- EKS
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Shubham Chaudhary
|
||||||
|
email: shubham.chaudhary@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
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/cassandra/pod-delete
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/cassandra/cassandra-pod-delete/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/cassandra/cassandra-pod-delete/experiment.yaml
|
55
experiments/cassandra/cassandra-pod-delete/engine.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: cassandra-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
appinfo:
|
||||||
|
appns: 'default'
|
||||||
|
applabel: 'app=cassandra'
|
||||||
|
appkind: 'statefulset'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
chaosServiceAccount: cassandra-pod-delete-sa
|
||||||
|
experiments:
|
||||||
|
- name: cassandra-pod-delete
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# set chaos duration (in sec) as desired
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
# set chaos interval (in sec) as desired
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
# pod failures without '--force' & default terminationGracePeriodSeconds
|
||||||
|
- name: FORCE
|
||||||
|
value: 'false'
|
||||||
|
|
||||||
|
# provide cassandra service name
|
||||||
|
# default service: cassandra
|
||||||
|
- name: CASSANDRA_SVC_NAME
|
||||||
|
value: 'cassandra'
|
||||||
|
|
||||||
|
# provide the keyspace replication factor
|
||||||
|
- name: KEYSPACE_REPLICATION_FACTOR
|
||||||
|
value: '3'
|
||||||
|
|
||||||
|
# provide cassandra port
|
||||||
|
# default port: 9042
|
||||||
|
- name: CASSANDRA_PORT
|
||||||
|
value: '9042'
|
||||||
|
|
||||||
|
# SET THE CASSANDRA_LIVENESS_CHECK
|
||||||
|
# IT CAN BE `enable` OR `disable`
|
||||||
|
- name: CASSANDRA_LIVENESS_CHECK
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## percentage of total pods to target
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
121
experiments/cassandra/cassandra-pod-delete/experiment.yaml
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Deletes a pod belonging to a casandra statefulset
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
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"]
|
||||||
|
# Create and manage the liveness and target application services
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["create","delete","get","list", "deletecollection"]
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# for deriving the parent/owner details of the pod
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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 cassandra-pod-delete
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
# provide cassandra service name
|
||||||
|
# default service: cassandra
|
||||||
|
- name: CASSANDRA_SVC_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the keyspace replication factor
|
||||||
|
- name: KEYSPACE_REPLICATION_FACTOR
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide cassandra port
|
||||||
|
# default port: 9042
|
||||||
|
- name: CASSANDRA_PORT
|
||||||
|
value: '9042'
|
||||||
|
|
||||||
|
# provide liveness deployement port
|
||||||
|
# default port: 8088, It only supports 8088 port
|
||||||
|
- name: LIVENESS_SVC_PORT
|
||||||
|
value: '8088'
|
||||||
|
|
||||||
|
# provide cassandra liveness image
|
||||||
|
- name: CASSANDRA_LIVENESS_IMAGE
|
||||||
|
value: 'litmuschaos/cassandra-client:latest'
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
## percentage of total pods to target
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
# SET THE CASSANDRA_LIVENESS_CHECK
|
||||||
|
# IT CAN BE `enable` OR `disable`
|
||||||
|
- name: CASSANDRA_LIVENESS_CHECK
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## Period to wait before and after injection of chaos
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: FORCE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## it defines the sequence of chaos execution for multiple target pods
|
||||||
|
## supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
## env var that describes the library used to execute the chaos
|
||||||
|
## default: litmus. Supported values: litmus
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
73
experiments/cassandra/cassandra-pod-delete/rbac.yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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"]
|
||||||
|
# Create and manage the liveness and target application services
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["create","delete","get","list", "deletecollection"]
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# for deriving the parent/owner details of the pod
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: cassandra-pod-delete-sa
|
||||||
|
namespace: default
|
||||||
|
|
42
experiments/cassandra/cassandra.chartserviceversion.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2020-04-14T10:28:08Z
|
||||||
|
name: cassandra
|
||||||
|
version: 0.1.3
|
||||||
|
annotations:
|
||||||
|
categories: Cassandra
|
||||||
|
chartDescription: Injects cassandra kubernetes chaos
|
||||||
|
spec:
|
||||||
|
displayName: Cassandra Chaos
|
||||||
|
categoryDescription: >
|
||||||
|
Cassandra is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle
|
||||||
|
large amounts of data across many commodity servers, providing high availability with no single point of failure.
|
||||||
|
It will install all the experiments which can be used to inject chaos into cassandra applications.
|
||||||
|
experiments:
|
||||||
|
- name: cassandra-pod-delete
|
||||||
|
description: ""
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Pod
|
||||||
|
- Cassandra
|
||||||
|
maintainers:
|
||||||
|
- name: ksatchit
|
||||||
|
email: karthik.s@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
links:
|
||||||
|
- name: Cassandra Website
|
||||||
|
url: http://cassandra.apache.org/
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/apache/cassandra
|
||||||
|
- name: Cassandra Slack
|
||||||
|
url: https://cassandra-slack.herokuapp.com
|
||||||
|
- name: Documentation
|
||||||
|
url: http://cassandra.apache.org/doc/latest/
|
||||||
|
icon:
|
||||||
|
- url: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/cassandra/icons/cassandra.png
|
||||||
|
mediatype: image/png
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/cassandra/experiments.yaml
|
5
experiments/cassandra/cassandra.package.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
packageName: cassandra
|
||||||
|
experiments:
|
||||||
|
- name: cassandra-pod-delete
|
||||||
|
CSV: cassandra-pod-delete.chartserviceversion.yaml
|
||||||
|
desc: "cassandra-pod-delete"
|
123
experiments/cassandra/experiments.yaml
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Deletes a pod belonging to a casandra statefulset
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
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"]
|
||||||
|
# Create and manage the liveness and target application services
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["create","delete","get","list", "deletecollection"]
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# for deriving the parent/owner details of the pod
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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 cassandra-pod-delete
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
# provide cassandra service name
|
||||||
|
# default service: cassandra
|
||||||
|
- name: CASSANDRA_SVC_NAME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the keyspace replication factor
|
||||||
|
- name: KEYSPACE_REPLICATION_FACTOR
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide cassandra port
|
||||||
|
# default port: 9042
|
||||||
|
- name: CASSANDRA_PORT
|
||||||
|
value: '9042'
|
||||||
|
|
||||||
|
# provide liveness deployement port
|
||||||
|
# default port: 8088, It only supports 8088 port
|
||||||
|
- name: LIVENESS_SVC_PORT
|
||||||
|
value: '8088'
|
||||||
|
|
||||||
|
# provide cassandra liveness image
|
||||||
|
- name: CASSANDRA_LIVENESS_IMAGE
|
||||||
|
value: 'litmuschaos/cassandra-client:latest'
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
## percentage of total pods to target
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
# SET THE CASSANDRA_LIVENESS_CHECK
|
||||||
|
# IT CAN BE `enable` OR `disable`
|
||||||
|
- name: CASSANDRA_LIVENESS_CHECK
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## Period to wait before and after injection of chaos
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: FORCE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## it defines the sequence of chaos execution for multiple target pods
|
||||||
|
## supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
## env var that describes the library used to execute the chaos
|
||||||
|
## default: litmus. Supported values: litmus
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: cassandra-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
|
||||||
|
---
|
BIN
experiments/cassandra/icons/cassandra-pod-delete.png
Normal file
After Width: | Height: | Size: 959 B |
BIN
experiments/cassandra/icons/cassandra.png
Normal file
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,43 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2019-12-30T10:28:08Z
|
||||||
|
name: coredns-pod-delete
|
||||||
|
version: 0.1.7
|
||||||
|
annotations:
|
||||||
|
categories: CoreDNS
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.cncf.io/
|
||||||
|
spec:
|
||||||
|
displayName: coredns-pod-delete
|
||||||
|
categoryDescription: |
|
||||||
|
Pod delete contains chaos to disrupt state of coredns resources. Experiments can inject random pod delete failures against specified application.
|
||||||
|
- Causes (forced/graceful) pod failure of coredns replicas of an application deployment.
|
||||||
|
- Tests of successful resolution of app services during chaos injection
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- CoreDNS
|
||||||
|
- DNS
|
||||||
|
- Pod
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- Minikube
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Raj Babu Das
|
||||||
|
email: raj.das@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: chartserviceversion
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
links:
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/litmuschaos/litmus-ansible/tree/master/experiments/coredns/pod_delete
|
||||||
|
- name: Documentation
|
||||||
|
url: https://v1-docs.litmuschaos.io/docs/coredns-pod-delete/
|
||||||
|
- name: Video
|
||||||
|
url: https://www.youtube.com/watch?v=pwo5idKW7q8
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuchaos/chaos-charts/master/charts/coredns/coredns-pod-delete/experiment.yaml
|
30
experiments/coredns/coredns-pod-delete/engine.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: engine-coredns
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
appinfo:
|
||||||
|
appns: 'kube-system'
|
||||||
|
applabel: 'k8s-app=kube-dns'
|
||||||
|
appkind: 'deployment'
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
chaosServiceAccount: coredns-pod-delete-sa
|
||||||
|
experiments:
|
||||||
|
- name: coredns-pod-delete
|
||||||
|
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: '10'
|
||||||
|
|
||||||
|
- name: CHAOS_NAMESPACE
|
||||||
|
value: 'kube-system'
|
72
experiments/coredns/coredns-pod-delete/experiment.yaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Deletes coredns pod in kube-system namespace
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: coredns-pod-delete
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "services"
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/log"
|
||||||
|
- "events"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "get"
|
||||||
|
- "list"
|
||||||
|
- "patch"
|
||||||
|
- "create"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
image: "litmuschaos/ansible-runner:latest"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ansible-playbook ./experiments/coredns/pod_delete/pod_delete_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: ANSIBLE_STDOUT_CALLBACK
|
||||||
|
value: 'default'
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
# provide the kill count
|
||||||
|
- name: KILL_COUNT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: FORCE
|
||||||
|
value: 'true'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '5'
|
||||||
|
|
||||||
|
#supported libs are litmus and powerfulseal
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/pod-delete-helper:latest'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
36
experiments/coredns/coredns-pod-delete/rbac.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
namespace: kube-system
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["","litmuschaos.io","batch"]
|
||||||
|
resources: ["services", "pods","jobs","events","pods/log","chaosengines","chaosexperiments","chaosresults"]
|
||||||
|
verbs: ["create","list","get","patch","update","delete"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: coredns-pod-delete-sa
|
||||||
|
namespace: kube-system
|
42
experiments/coredns/coredns.chartserviceversion.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2019-12-30T10:28:08Z
|
||||||
|
name: coredns
|
||||||
|
version: 0.1.4
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
chartDescription: Injects coredns chaos
|
||||||
|
spec:
|
||||||
|
displayName: CoreDNS chaos
|
||||||
|
categoryDescription: >
|
||||||
|
CoreDNS is an open-source system for DNS management of containerized applications.
|
||||||
|
It helps to resolve services to IP address. It will install all the experiments which can be used to inject chaos into containerized applications.
|
||||||
|
experiments:
|
||||||
|
- name: coredns-pod-delete
|
||||||
|
description: ""
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Pod
|
||||||
|
- CoreDNS
|
||||||
|
- DNS
|
||||||
|
maintainers:
|
||||||
|
- name: Raj Babu Das
|
||||||
|
email: raj.das@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
links:
|
||||||
|
- name: CoreDNS Website
|
||||||
|
url: https://coredns.io
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/coredns/coredns
|
||||||
|
- name: CoreDNS Slack
|
||||||
|
url: https://slack.cncf.io/
|
||||||
|
- name: Documentation
|
||||||
|
url: https://coredns.io/manual/toc/
|
||||||
|
icon:
|
||||||
|
- url: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/coredns/icons/coredns-pod-delete.png
|
||||||
|
mediatype: image/png
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/coredns/experiments.yaml
|
5
experiments/coredns/coredns.package.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
packageName: coredns
|
||||||
|
experiments:
|
||||||
|
- name: coredns-pod-delete
|
||||||
|
CSV: coredns-pod-delete.chartserviceversion.yaml
|
||||||
|
desc: "coredns pod delete experiment"
|
74
experiments/coredns/experiments.yaml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Deletes coredns pod in kube-system namespace
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: coredns-pod-delete
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
permissions:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
- "batch"
|
||||||
|
- "litmuschaos.io"
|
||||||
|
resources:
|
||||||
|
- "services"
|
||||||
|
- "jobs"
|
||||||
|
- "pods"
|
||||||
|
- "pods/log"
|
||||||
|
- "events"
|
||||||
|
- "chaosengines"
|
||||||
|
- "chaosexperiments"
|
||||||
|
- "chaosresults"
|
||||||
|
verbs:
|
||||||
|
- "get"
|
||||||
|
- "list"
|
||||||
|
- "patch"
|
||||||
|
- "create"
|
||||||
|
- "update"
|
||||||
|
- "delete"
|
||||||
|
image: "litmuschaos/ansible-runner:latest"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- ansible-playbook ./experiments/coredns/pod_delete/pod_delete_ansible_logic.yml -i /etc/ansible/hosts -vv; exit 0
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: ANSIBLE_STDOUT_CALLBACK
|
||||||
|
value: 'default'
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '15'
|
||||||
|
|
||||||
|
# provide the kill count
|
||||||
|
- name: KILL_COUNT
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: FORCE
|
||||||
|
value: 'true'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '5'
|
||||||
|
|
||||||
|
#supported libs are litmus and powerfulseal
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/pod-delete-helper:latest'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: coredns-pod-delete
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
|
||||||
|
---
|
BIN
experiments/coredns/icons/coredns-pod-delete.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
experiments/coredns/icons/coredns.png
Normal file
After Width: | Height: | Size: 20 KiB |
374
experiments/gcp/experiments.yaml
Normal file
@@ -0,0 +1,374 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance filtered by a label for a specified duration before attaching them back
|
||||||
|
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: latest
|
||||||
|
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: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Stops GCP VM instances and GKE nodes filtered by a label for a specified duration and later restarts them
|
||||||
|
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: latest
|
||||||
|
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'
|
||||||
|
|
||||||
|
# set the percentage value of the instances with the given label
|
||||||
|
# which should be targeted as part of the chaos injection
|
||||||
|
- name: INSTANCE_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-by-label
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Stops GCP VM instances and GKE nodes for a specified duration and later restarts them
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# parallel or serial; determines how the VM instances are terminated, all at once or one at a time
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
# period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
# Multiple instance names can be provided as comma separated values ex: instance1,instance2
|
||||||
|
- name: VM_INSTANCE_NAMES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# GCP project ID to which the vm instances belong
|
||||||
|
- name: GCP_PROJECT_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Instance zone(s) of the target vm instance(s)
|
||||||
|
# If more than one instance is targetted, provide zone for each in the order of their
|
||||||
|
# respective instance name in VM_INSTANCE_NAME as comma separated values ex: zone1,zone2
|
||||||
|
- name: INSTANCE_ZONES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance for a specified duration before attaching them back
|
||||||
|
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:
|
||||||
|
# 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
|
||||||
|
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: ''
|
||||||
|
|
||||||
|
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/
|
||||||
|
|
||||||
|
---
|
41
experiments/gcp/gcp-vm-disk-loss-by-label/engine.yaml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: gcp-disk-chaos
|
||||||
|
spec:
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: gcp-vm-disk-loss-by-label-sa
|
||||||
|
experiments:
|
||||||
|
- name: gcp-vm-disk-loss-by-label
|
||||||
|
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 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: ''
|
||||||
|
|
||||||
|
# parallel or serial; determines how chaos is injected
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
83
experiments/gcp/gcp-vm-disk-loss-by-label/experiment.yaml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance filtered by a label for a specified duration before attaching them back
|
||||||
|
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: latest
|
||||||
|
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: latest
|
||||||
|
secrets:
|
||||||
|
- name: cloud-secret
|
||||||
|
mountPath: /tmp/
|
@@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-by-label
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: gcp
|
||||||
|
spec:
|
||||||
|
displayName: gcp-vm-disk-loss-by-label
|
||||||
|
categoryDescription: >
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance filtered by a label for a specified duration before attaching them back
|
||||||
|
keywords:
|
||||||
|
- "Disk"
|
||||||
|
- "GCP"
|
||||||
|
platforms:
|
||||||
|
- "Minikube"
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Neelanjan Manna
|
||||||
|
email: neelanjan.manna@harness.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Harness
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: chartserviceversion
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
links:
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/gcp/gcp-vm-disk-loss-by-label/
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/gcp/gcp-vm-disk-loss-by-label/experiment.yaml
|
62
experiments/gcp/gcp-vm-disk-loss-by-label/rbac.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gcp-vm-disk-loss-by-label-sa
|
||||||
|
namespace: default
|
40
experiments/gcp/gcp-vm-disk-loss/engine.yaml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
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: ''
|
||||||
|
|
||||||
|
# parallel or serial; determines how chaos is injected
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
89
experiments/gcp/gcp-vm-disk-loss/experiment.yaml
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Causes loss of a non-boot storage persistent disk from a GCP VM instance for a specified duration before attaching them back
|
||||||
|
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:
|
||||||
|
# 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
|
||||||
|
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: ''
|
||||||
|
|
||||||
|
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,33 @@
|
|||||||
|
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 before attaching them back
|
||||||
|
keywords:
|
||||||
|
- "Disk"
|
||||||
|
- "GCP"
|
||||||
|
platforms:
|
||||||
|
- "GCP"
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Neelanjan Manna
|
||||||
|
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://litmuschaos.github.io/litmus/experiments/categories/gcp/gcp-vm-disk-loss/
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/gcp/gcp-vm-disk-loss/experiment.yaml
|
62
experiments/gcp/gcp-vm-disk-loss/rbac.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
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:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
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
|
46
experiments/gcp/gcp-vm-instance-stop-by-label/engine.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-chaos
|
||||||
|
spec:
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: gcp-vm-instance-stop-by-label-sa
|
||||||
|
# It can be delete/retain
|
||||||
|
experiments:
|
||||||
|
- name: gcp-vm-instance-stop-by-label
|
||||||
|
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'
|
||||||
|
|
||||||
|
- 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 instances are a part of a managed instance group
|
||||||
|
- name: MANAGED_INSTANCE_GROUP
|
||||||
|
value: 'disable'
|
||||||
|
|
||||||
|
# set the percentage value of the instances with the given label
|
||||||
|
# which should be targeted as part of the chaos injection
|
||||||
|
- name: INSTANCE_AFFECTED_PERC
|
||||||
|
value: ''
|
@@ -0,0 +1,95 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Stops GCP VM instances and GKE nodes filtered by a label for a specified duration and later restarts them
|
||||||
|
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: latest
|
||||||
|
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'
|
||||||
|
|
||||||
|
# set the percentage value of the instances with the given label
|
||||||
|
# which should be targeted as part of the chaos injection
|
||||||
|
- name: INSTANCE_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-by-label
|
||||||
|
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,33 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-by-label
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: gcp
|
||||||
|
spec:
|
||||||
|
displayName: gcp-vm-instance-stop-by-label
|
||||||
|
categoryDescription: >
|
||||||
|
Stops GCP VM instances and GKE nodes filtered by a label for a specified duration and later restarts them
|
||||||
|
keywords:
|
||||||
|
- "VM"
|
||||||
|
- "GCP"
|
||||||
|
platforms:
|
||||||
|
- "Minikube"
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Neelanjan Manna
|
||||||
|
email: neelanjan.manna@harness.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Harness
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: chartserviceversion
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
links:
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/gcp/gcp-vm-instance-stop-by-label/
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/gcp/gcp-vm-instance-stop-by-label/experiment.yaml
|
66
experiments/gcp/gcp-vm-instance-stop-by-label/rbac.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gcp-vm-instance-stop-by-label-sa
|
||||||
|
namespace: default
|
42
experiments/gcp/gcp-vm-instance-stop/engine.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-chaos
|
||||||
|
spec:
|
||||||
|
engineState: 'active'
|
||||||
|
chaosServiceAccount: gcp-vm-instance-stop-sa
|
||||||
|
experiments:
|
||||||
|
- name: gcp-vm-instance-stop
|
||||||
|
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'
|
||||||
|
|
||||||
|
# Instance name of the target vm instance(s)
|
||||||
|
# Multiple instance names can be provided as comma separated values ex: instance1,instance2
|
||||||
|
- name: VM_INSTANCE_NAMES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# GCP project ID to which the vm instances belong
|
||||||
|
- name: GCP_PROJECT_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Instance zone(s) of the target vm instance(s)
|
||||||
|
# If more than one instance is targetted, provide zone for each in the order of their
|
||||||
|
# respective instance name in VM_INSTANCE_NAME as comma separated values ex: zone1,zone2
|
||||||
|
- name: INSTANCE_ZONES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# enable it if the target instance is a part of a managed instance group.
|
||||||
|
- name: MANAGED_INSTANCE_GROUP
|
||||||
|
value: 'disable'
|
||||||
|
|
||||||
|
# parallel or serial; determines how chaos is injected
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
99
experiments/gcp/gcp-vm-instance-stop/experiment.yaml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Stops GCP VM instances and GKE nodes for a specified duration and later restarts them
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '30'
|
||||||
|
|
||||||
|
# parallel or serial; determines how the VM instances are terminated, all at once or one at a time
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
# provide the LIB
|
||||||
|
# only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
# period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
# Multiple instance names can be provided as comma separated values ex: instance1,instance2
|
||||||
|
- name: VM_INSTANCE_NAMES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# GCP project ID to which the vm instances belong
|
||||||
|
- name: GCP_PROJECT_ID
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Instance zone(s) of the target vm instance(s)
|
||||||
|
# If more than one instance is targetted, provide zone for each in the order of their
|
||||||
|
# respective instance name in VM_INSTANCE_NAME as comma separated values ex: zone1,zone2
|
||||||
|
- name: INSTANCE_ZONES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
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,33 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: gcp
|
||||||
|
spec:
|
||||||
|
displayName: gcp-vm-instance-stop
|
||||||
|
categoryDescription: >
|
||||||
|
Stops GCP VM instances and GKE nodes for a specified duration and later restarts them
|
||||||
|
keywords:
|
||||||
|
- "VM"
|
||||||
|
- "GCP"
|
||||||
|
platforms:
|
||||||
|
- "GCP"
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Neelanjan Manna
|
||||||
|
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://litmuschaos.github.io/litmus/experiments/categories/gcp/gcp-vm-instance-stop/
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/gcp/gcp-vm-instance-stop/experiment.yaml
|
66
experiments/gcp/gcp-vm-instance-stop/rbac.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 creating and managing to execute comands inside target container
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["get","list","create"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
labels:
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gcp-vm-instance-stop-sa
|
||||||
|
namespace: default
|
42
experiments/gcp/gcp.chartserviceversion.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
name: gcp
|
||||||
|
version: 0.1.0
|
||||||
|
annotations:
|
||||||
|
categories: gcp
|
||||||
|
spec:
|
||||||
|
displayName: gcp chaos
|
||||||
|
categoryDescription: >
|
||||||
|
GCP contains chaos to disrupt state of gcp resources running part of the gcp services
|
||||||
|
experiments:
|
||||||
|
- name: gcp-vm-instance-stop
|
||||||
|
description: ""
|
||||||
|
- name: gcp-vm-disk-loss
|
||||||
|
description: ""
|
||||||
|
- name: gcp-vm-instance-stop-by-label
|
||||||
|
description: ""
|
||||||
|
- name: gcp-vm-disk-loss-by-label
|
||||||
|
description: ""
|
||||||
|
keywords:
|
||||||
|
- "VM"
|
||||||
|
- "Disk"
|
||||||
|
- "GCP"
|
||||||
|
- "Infra"
|
||||||
|
maintainers:
|
||||||
|
- name: Neelanjan Manna
|
||||||
|
email: neelanjan.manna@harness.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Harness
|
||||||
|
links:
|
||||||
|
- name: GCP Website
|
||||||
|
url: https://cloud.google.com/
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/contents/#cloud-infrastructure
|
||||||
|
- name: Community Slack
|
||||||
|
url: https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/gcp/experiments.yaml
|
14
experiments/gcp/gcp.package.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
packageName: gcp
|
||||||
|
experiments:
|
||||||
|
- name: gcp-vm-instance-stop
|
||||||
|
CSV: gcp-vm-instance-stop.chartserviceversion.yaml
|
||||||
|
desc: "gcp-vm-instance-stop"
|
||||||
|
- name: gcp-vm-disk-loss
|
||||||
|
CSV: gcp-vm-disk-loss.chartserviceversion.yaml
|
||||||
|
desc: "gcp-vm-disk-loss"
|
||||||
|
- name: gcp-vm-instance-stop-by-label
|
||||||
|
CSV: gcp-vm-instance-stop-by-label.chartserviceversion.yaml
|
||||||
|
desc: "gcp-vm-instance-stop-by-label"
|
||||||
|
- name: gcp-vm-disk-loss-by-label
|
||||||
|
CSV: gcp-vm-disk-loss-by-label.chartserviceversion.yaml
|
||||||
|
desc: "gcp-vm-disk-loss-by-label"
|
BIN
experiments/gcp/icons/gcp-vm-disk-loss-by-label.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
experiments/gcp/icons/gcp-vm-disk-loss.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
experiments/gcp/icons/gcp-vm-instance-stop-by-label.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
experiments/gcp/icons/gcp-vm-instance-stop.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
experiments/gcp/icons/gcp.png
Normal file
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,48 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2019-10-15T10:28:08Z
|
||||||
|
name: container-kill
|
||||||
|
version: 0.1.13
|
||||||
|
annotations:
|
||||||
|
categories: "Kubernetes"
|
||||||
|
vendor: "CNCF"
|
||||||
|
support: https://slack.openebs.io/
|
||||||
|
spec:
|
||||||
|
displayName: container-kill
|
||||||
|
categoryDescription: |
|
||||||
|
Container kill contains chaos to disrupt state of kubernetes resources. Experiments can inject random container delete failures against specified application.
|
||||||
|
- Executes SIGKILL on containers of random replicas of an application deployment.
|
||||||
|
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod.
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Pod
|
||||||
|
- Container
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- Minikube
|
||||||
|
- Packet(Kubeadm)
|
||||||
|
- EKS
|
||||||
|
- AKS
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: ksatchit
|
||||||
|
email: karthik.s@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
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/generic/container-kill
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/pods/container-kill/
|
||||||
|
- name: Video
|
||||||
|
url: https://www.youtube.com/watch?v=XKyMNdVsKMo
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/container-kill/experiment.yaml
|
42
experiments/generic/container-kill/engine.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
appinfo:
|
||||||
|
appns: 'default'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: container-kill-sa
|
||||||
|
experiments:
|
||||||
|
- name: container-kill
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# provide the total chaos duration
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '20'
|
||||||
|
|
||||||
|
# provide the chaos interval
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
# provide the name of container runtime
|
||||||
|
# for litmus LIB, it supports docker, containerd, crio
|
||||||
|
# for pumba LIB, it supports docker only
|
||||||
|
- name: CONTAINER_RUNTIME
|
||||||
|
value: 'docker'
|
||||||
|
|
||||||
|
# provide the socket file path
|
||||||
|
- name: SOCKET_PATH
|
||||||
|
value: '/var/run/docker.sock'
|
||||||
|
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
|
@@ -0,0 +1,46 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: nginx
|
||||||
|
spec:
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
appinfo:
|
||||||
|
appns: 'nginx'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: container-kill-sa
|
||||||
|
# It can be delete/retain
|
||||||
|
jobCleanUpPolicy: 'delete'
|
||||||
|
experiments:
|
||||||
|
- name: container-kill
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
# provide the total chaos duration
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '20'
|
||||||
|
|
||||||
|
# provide the chaos interval
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
# provide the name of container runtime
|
||||||
|
# for litmus LIB, it supports docker, containerd, crio
|
||||||
|
# for pumba LIB, it supports docker only
|
||||||
|
- name: CONTAINER_RUNTIME
|
||||||
|
value: 'docker'
|
||||||
|
|
||||||
|
# provide the socket file path
|
||||||
|
- name: SOCKET_PATH
|
||||||
|
value: '/var/run/docker.sock'
|
||||||
|
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
|
125
experiments/generic/container-kill/experiment.yaml
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: "Kills a container belonging to an application pod \n"
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: container-kill
|
||||||
|
labels:
|
||||||
|
name: container-kill
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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 container-kill
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# lib can be litmus or pumba
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
- name: TARGET_PODS
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide the chaos interval
|
||||||
|
- name: CHAOS_INTERVAL
|
||||||
|
value: '10'
|
||||||
|
|
||||||
|
- name: SIGNAL
|
||||||
|
value: 'SIGKILL'
|
||||||
|
|
||||||
|
# provide the socket file path
|
||||||
|
- name: SOCKET_PATH
|
||||||
|
value: '/var/run/docker.sock'
|
||||||
|
|
||||||
|
# provide the name of container runtime
|
||||||
|
# for litmus LIB, it supports docker, containerd, crio
|
||||||
|
# for pumba LIB, it supports docker only
|
||||||
|
- name: CONTAINER_RUNTIME
|
||||||
|
value: 'docker'
|
||||||
|
|
||||||
|
# provide the total chaos duration
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '20'
|
||||||
|
|
||||||
|
## percentage of total pods to target
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# To select pods on specific node(s)
|
||||||
|
- name: NODE_LABEL
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
|
||||||
|
## it defines the sequence of chaos execution for multiple target pods
|
||||||
|
## supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: container-kill
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/runtime-api-usage: "true"
|
||||||
|
app.kubernetes.io/version: latest
|
86
experiments/generic/container-kill/rbac-psp.yaml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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"]
|
||||||
|
# use litmus psp
|
||||||
|
- apiGroups: ["policy"]
|
||||||
|
resources: ["podsecuritypolicies"]
|
||||||
|
verbs: ["use"]
|
||||||
|
resourceNames: ["litmus"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: container-kill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
|
81
experiments/generic/container-kill/rbac.yaml
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: container-kill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: default
|
||||||
|
|
@@ -0,0 +1,78 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: nginx
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: nginx
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: nginx
|
||||||
|
labels:
|
||||||
|
name: container-kill-sa
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: container-kill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: container-kill-sa
|
||||||
|
namespace: nginx
|
||||||
|
|
@@ -0,0 +1,48 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2019-11-11T10:28:08Z
|
||||||
|
name: disk-fill
|
||||||
|
version: 0.0.12
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.kubernetes.io/
|
||||||
|
spec:
|
||||||
|
displayName: disk-fill
|
||||||
|
categoryDescription: |
|
||||||
|
Disk fill contains chaos to disrupt state of kubernetes resources.
|
||||||
|
- Causes (forced/graceful) Disk Stress by filling up the Ephemeral Storage of the Pod using one of it containers.
|
||||||
|
- Causes Pod to get Evicted if the Pod exceeds it Ephemeral Storage Limit.
|
||||||
|
- Tests the Ephemeral Storage Limits, to ensure those parameters are sufficient.
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Pod
|
||||||
|
- Disk
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- EKS
|
||||||
|
- AKS
|
||||||
|
maturity: alpha
|
||||||
|
chaosType: infra
|
||||||
|
maintainers:
|
||||||
|
- name: ksatchit
|
||||||
|
email: karthik.s@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
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/generic/disk-fill
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/pods/disk-fill/
|
||||||
|
- name: Video
|
||||||
|
url: https://www.youtube.com/watch?v=pbok737rUPQ
|
||||||
|
icon:
|
||||||
|
- url:
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/disk-fill/experiment.yaml
|
34
experiments/generic/disk-fill/engine.yaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
#ex. values: ns1:name=percona,ns2:run=nginx
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
appinfo:
|
||||||
|
appns: 'default'
|
||||||
|
applabel: 'app=nginx'
|
||||||
|
appkind: 'deployment'
|
||||||
|
chaosServiceAccount: disk-fill-sa
|
||||||
|
experiments:
|
||||||
|
- name: disk-fill
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# specify the fill percentage according to the disk pressure required
|
||||||
|
- name: FILL_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the container runtime path
|
||||||
|
# Default set to docker container path
|
||||||
|
- name: CONTAINER_PATH
|
||||||
|
value: '/var/lib/docker/containers'
|
125
experiments/generic/disk-fill/experiment.yaml
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Fillup Ephemeral Storage of a Resource
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: disk-fill
|
||||||
|
labels:
|
||||||
|
name: disk-fill
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
spec:
|
||||||
|
definition:
|
||||||
|
scope: Namespaced
|
||||||
|
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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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 disk-fill
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TARGET_CONTAINER
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: FILL_PERCENTAGE
|
||||||
|
value: '80'
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '60'
|
||||||
|
|
||||||
|
# Period to wait before and after injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# Provide the LIB here
|
||||||
|
# Only litmus supported
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
# provide the data block size
|
||||||
|
# supported unit is KB
|
||||||
|
- name: DATA_BLOCK_SIZE
|
||||||
|
value: '256'
|
||||||
|
|
||||||
|
- name: TARGET_PODS
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: EPHEMERAL_STORAGE_MEBIBYTES
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# To select pods on specific node(s)
|
||||||
|
- name: NODE_LABEL
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
## percentage of total pods to target
|
||||||
|
- name: PODS_AFFECTED_PERC
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'litmuschaos/go-runner:latest'
|
||||||
|
|
||||||
|
# Provide the container runtime path
|
||||||
|
# Default set to docker container path
|
||||||
|
- name: CONTAINER_PATH
|
||||||
|
value: '/var/lib/docker/containers'
|
||||||
|
|
||||||
|
## it defines the sequence of chaos execution for multiple target pods
|
||||||
|
## supported values: serial, parallel
|
||||||
|
- name: SEQUENCE
|
||||||
|
value: 'parallel'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: disk-fill
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/host-path-usage: "true"
|
||||||
|
app.kubernetes.io/version: latest
|
85
experiments/generic/disk-fill/rbac-psp.yaml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: disk-fill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: disk-fill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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"]
|
||||||
|
# use litmus psp
|
||||||
|
- apiGroups: ["policy"]
|
||||||
|
resources: ["podsecuritypolicies"]
|
||||||
|
verbs: ["use"]
|
||||||
|
resourceNames: ["litmus"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: disk-fill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: disk-fill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
80
experiments/generic/disk-fill/rbac.yaml
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: disk-fill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: disk-fill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is anyof {deployment, statefulset, daemonsets})
|
||||||
|
- apiGroups: ["apps"]
|
||||||
|
resources: ["deployments","statefulsets","replicasets", "daemonsets"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: ["apps.openshift.io"]
|
||||||
|
resources: ["deploymentconfigs"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is deploymentConfig)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["replicationcontrollers"]
|
||||||
|
verbs: ["get","list"]
|
||||||
|
# deriving the parent/owner details of the pod(if parent is argo-rollouts)
|
||||||
|
- apiGroups: ["argoproj.io"]
|
||||||
|
resources: ["rollouts"]
|
||||||
|
verbs: ["list","get"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: disk-fill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: disk-fill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: disk-fill-sa
|
||||||
|
namespace: default
|
@@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2020-07-14T10:28:08Z
|
||||||
|
name: docker-service-kill
|
||||||
|
version: 0.1.1
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
vendor: CNCF
|
||||||
|
support: https://slack.kubernetes.io/
|
||||||
|
spec:
|
||||||
|
displayName: docker-service-kill
|
||||||
|
categoryDescription: |
|
||||||
|
docker-service-kill contains killing docker service gracefully for a certain chaos duration.
|
||||||
|
- Causes replicas may be evicted or becomes unreachable on account on nodes turning unschedulable (Not Ready) due to docker service kill.
|
||||||
|
- The application node should be healthy once chaos is stopped and the services are reaccessable.
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Node
|
||||||
|
- Service
|
||||||
|
- Docker
|
||||||
|
platforms:
|
||||||
|
- GKE
|
||||||
|
- AKS
|
||||||
|
maturity: alpha
|
||||||
|
maintainers:
|
||||||
|
- name: Ankur Ghosh
|
||||||
|
email: ankur.ghosh3@wipro.com
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Wipro
|
||||||
|
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/generic/docker-service-kill
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/nodes/docker-service-kill/
|
||||||
|
- name: Video
|
||||||
|
url:
|
||||||
|
|
||||||
|
icon:
|
||||||
|
- base64data: ""
|
||||||
|
mediatype: ""
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/docker-service-kill/experiment.yaml
|
23
experiments/generic/docker-service-kill/engine.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
kind: ChaosEngine
|
||||||
|
metadata:
|
||||||
|
name: nginx-chaos
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
# It can be active/stop
|
||||||
|
engineState: 'active'
|
||||||
|
auxiliaryAppInfo: ''
|
||||||
|
chaosServiceAccount: docker-service-kill-sa
|
||||||
|
experiments:
|
||||||
|
- name: docker-service-kill
|
||||||
|
spec:
|
||||||
|
components:
|
||||||
|
# nodeSelector:
|
||||||
|
# # provide the node labels
|
||||||
|
# kubernetes.io/hostname: 'node02'
|
||||||
|
env:
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '90' # in seconds
|
||||||
|
|
||||||
|
- name: TARGET_NODE
|
||||||
|
value: ''
|
85
experiments/generic/docker-service-kill/experiment.yaml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
apiVersion: litmuschaos.io/v1alpha1
|
||||||
|
description:
|
||||||
|
message: |
|
||||||
|
Kills the docker service on the application node to check the resiliency.
|
||||||
|
kind: ChaosExperiment
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: chaosexperiment
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# 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 docker-service-kill
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
env:
|
||||||
|
|
||||||
|
- name: TOTAL_CHAOS_DURATION
|
||||||
|
value: '90' # in seconds
|
||||||
|
|
||||||
|
# Period to wait before injection of chaos in sec
|
||||||
|
- name: RAMP_TIME
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
- name: LIB
|
||||||
|
value: 'litmus'
|
||||||
|
|
||||||
|
- name: NODE_LABEL
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
# provide lib image
|
||||||
|
- name: LIB_IMAGE
|
||||||
|
value: 'ubuntu:16.04'
|
||||||
|
|
||||||
|
# provide the target node name
|
||||||
|
- name: TARGET_NODE
|
||||||
|
value: ''
|
||||||
|
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
app.kubernetes.io/component: experiment-job
|
||||||
|
app.kubernetes.io/service-kill: "true"
|
||||||
|
app.kubernetes.io/version: latest
|
||||||
|
|
71
experiments/generic/docker-service-kill/rbac-psp.yaml
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# 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"]
|
||||||
|
# use litmus psp
|
||||||
|
- apiGroups: ["policy"]
|
||||||
|
resources: ["podsecuritypolicies"]
|
||||||
|
verbs: ["use"]
|
||||||
|
resourceNames: ["litmus"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
namespace: default
|
66
experiments/generic/docker-service-kill/rbac.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
rules:
|
||||||
|
# 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 details and mount it to the experiment pod (if specified)
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get","list",]
|
||||||
|
# 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"]
|
||||||
|
# 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"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
labels:
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
app.kubernetes.io/part-of: litmus
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: docker-service-kill-sa
|
||||||
|
namespace: default
|
2959
experiments/generic/experiments.yaml
Normal file
101
experiments/generic/generic.chartserviceversion.yaml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
apiVersion: litmuchaos.io/v1alpha1
|
||||||
|
kind: ChartServiceVersion
|
||||||
|
metadata:
|
||||||
|
createdAt: 2019-09-26T10:28:08Z
|
||||||
|
name: generic
|
||||||
|
version: 0.1.16
|
||||||
|
annotations:
|
||||||
|
categories: Kubernetes
|
||||||
|
chartDescription: Injects generic kubernetes chaos
|
||||||
|
spec:
|
||||||
|
displayName: Generic Chaos
|
||||||
|
categoryDescription: >
|
||||||
|
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easier management and discovery. It will install all the experiments which can be used to inject chaos into containerized applications.
|
||||||
|
|
||||||
|
experiments:
|
||||||
|
- name: pod-delete
|
||||||
|
description: "deletes a k8s pod"
|
||||||
|
- name: container-kill
|
||||||
|
description: "deletes a container in a k8s pod"
|
||||||
|
- name: pod-cpu-hog
|
||||||
|
description: ""
|
||||||
|
- name: pod-network-loss
|
||||||
|
description: ""
|
||||||
|
- name: pod-network-latency
|
||||||
|
description: ""
|
||||||
|
- name: pod-network-corruption
|
||||||
|
description: ""
|
||||||
|
- name: node-drain
|
||||||
|
description: ""
|
||||||
|
- name: node-cpu-hog
|
||||||
|
description: ""
|
||||||
|
- name: disk-fill
|
||||||
|
description: ""
|
||||||
|
- name: node-memory-hog
|
||||||
|
description: ""
|
||||||
|
- name: pod-memory-hog
|
||||||
|
description: ""
|
||||||
|
- name: kubelet-service-kill
|
||||||
|
description: ""
|
||||||
|
- name: pod-network-duplication
|
||||||
|
description: ""
|
||||||
|
- name: node-taint
|
||||||
|
description: ""
|
||||||
|
- name: docker-service-kill
|
||||||
|
description: ""
|
||||||
|
- name: pod-autoscaler
|
||||||
|
description: ""
|
||||||
|
- name: node-io-stress
|
||||||
|
description: ""
|
||||||
|
- name: pod-io-stress
|
||||||
|
description: ""
|
||||||
|
- name: node-restart
|
||||||
|
description: ""
|
||||||
|
- name: pod-dns-error
|
||||||
|
description: ""
|
||||||
|
- name: pod-dns-spoof
|
||||||
|
description: ""
|
||||||
|
- name: pod-cpu-hog-exec
|
||||||
|
description: ""
|
||||||
|
- name: pod-memory-hog-exec
|
||||||
|
description: ""
|
||||||
|
- name: pod-network-partition
|
||||||
|
description: ""
|
||||||
|
- name: pod-http-latency
|
||||||
|
description: ""
|
||||||
|
keywords:
|
||||||
|
- Kubernetes
|
||||||
|
- K8S
|
||||||
|
- Container
|
||||||
|
- Node
|
||||||
|
- Pod
|
||||||
|
- Disk
|
||||||
|
- IO
|
||||||
|
- Filesystem
|
||||||
|
- Network
|
||||||
|
- CPU
|
||||||
|
- Memory
|
||||||
|
- Stress
|
||||||
|
- Service
|
||||||
|
- DNS
|
||||||
|
- Scale
|
||||||
|
- Http
|
||||||
|
maintainers:
|
||||||
|
- name: ksatchit
|
||||||
|
email: karthik.s@mayadata.io
|
||||||
|
minKubeVersion: 1.12.0
|
||||||
|
provider:
|
||||||
|
name: Mayadata
|
||||||
|
links:
|
||||||
|
- name: Kubernetes Website
|
||||||
|
url: https://kubernetes.io
|
||||||
|
- name: Source Code
|
||||||
|
url: https://github.com/kubernetes/kubernetes
|
||||||
|
- name: Kubernetes Slack
|
||||||
|
url: https://slack.kubernetes.io/
|
||||||
|
- name: Documentation
|
||||||
|
url: https://litmuschaos.github.io/litmus/experiments/categories/contents/#generic
|
||||||
|
icon:
|
||||||
|
- url: https://raw.githubusercontent.com/litmuschaos/charthub.litmuschaos.io/master/public/litmus.ico
|
||||||
|
mediatype: image/png
|
||||||
|
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/experiments.yaml
|
77
experiments/generic/generic.package.yaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
packageName: generic
|
||||||
|
experiments:
|
||||||
|
- name: pod-delete
|
||||||
|
CSV: pod-delete.chartserviceversion.yaml
|
||||||
|
desc: "pod-delete"
|
||||||
|
- name: container-kill
|
||||||
|
CSV: container-kill.chartserviceversion.yaml
|
||||||
|
desc: "container-kill"
|
||||||
|
- name: pod-network-loss
|
||||||
|
CSV: pod-network-loss.chartserviceversion.yaml
|
||||||
|
desc: "Pod-network-loss"
|
||||||
|
- name: pod-network-latency
|
||||||
|
CSV: pod-network-latency.chartserviceversion.yaml
|
||||||
|
desc: "pod-network-latency"
|
||||||
|
- name: pod-cpu-hog
|
||||||
|
CSV: pod-cpu-hog.chartserviceversion.yaml
|
||||||
|
desc: "pod-cpu-hog"
|
||||||
|
- name: node-cpu-hog
|
||||||
|
CSV: node-cpu-hog.chartserviceversion.yaml
|
||||||
|
desc: "node-cpu-hog"
|
||||||
|
- name: disk-fill
|
||||||
|
CSV: disk-fill.chartserviceversion.yaml
|
||||||
|
desc: "disk-fill"
|
||||||
|
- name: node-drain
|
||||||
|
CSV: node-drain.chartserviceversion.yaml
|
||||||
|
desc: "node-drain"
|
||||||
|
- name: pod-network-corruption
|
||||||
|
CSV: pod-network-corruption.chartserviceversion.yaml
|
||||||
|
desc: "pod-network-corruption"
|
||||||
|
- name: node-memory-hog
|
||||||
|
CSV: node-memory-hog.chartserviceversion.yaml
|
||||||
|
desc: "node-memory-hog"
|
||||||
|
- name: pod-memory-hog
|
||||||
|
CSV: pod-memory-hog.chartserviceversion.yaml
|
||||||
|
desc: "pod-memory-hog"
|
||||||
|
- name: kubelet-service-kill
|
||||||
|
CSV: kubelet-service-kill.chartserviceversion.yaml
|
||||||
|
desc: "kubelet-service-kill"
|
||||||
|
- name: pod-network-duplication
|
||||||
|
CSV: pod-network-duplication.chartserviceversion.yaml
|
||||||
|
desc: "pod-network-duplication"
|
||||||
|
- name: node-taint
|
||||||
|
CSV: node-taint.chartserviceversion.yaml
|
||||||
|
desc: "node-taint"
|
||||||
|
- name: docker-service-kill
|
||||||
|
CSV: docker-service-kill.chartserviceversion.yaml
|
||||||
|
desc: "docker-service-kill"
|
||||||
|
- name: pod-autoscaler
|
||||||
|
CSV: pod-autoscaler.chartserviceversion.yaml
|
||||||
|
desc: "pod-autoscaler"
|
||||||
|
- name: node-io-stress
|
||||||
|
CSV: node-io-stress.chartserviceversion.yaml
|
||||||
|
desc: "node-io-stress"
|
||||||
|
- name: pod-io-stress
|
||||||
|
CSV: pod-io-stress.chartserviceversion.yaml
|
||||||
|
desc: "pod-io-stress"
|
||||||
|
- name: node-restart
|
||||||
|
CSV: node-restart.chartserviceversion.yaml
|
||||||
|
desc: "node-restart"
|
||||||
|
- name: pod-dns-error
|
||||||
|
CSV: pod-dns-error.chartserviceversion.yaml
|
||||||
|
desc: "pod-dns-error"
|
||||||
|
- name: pod-dns-spoof
|
||||||
|
CSV: pod-dns-spoof.chartserviceversion.yaml
|
||||||
|
desc: "pod-dns-spoof"
|
||||||
|
- name: pod-cpu-hog-exec
|
||||||
|
CSV: pod-cpu-hog-exec.chartserviceversion.yaml
|
||||||
|
desc: "pod-cpu-hog-exec"
|
||||||
|
- name: pod-memory-hog-exec
|
||||||
|
CSV: pod-memory-hog-exec.chartserviceversion.yaml
|
||||||
|
desc: "pod-memory-hog-exec"
|
||||||
|
- name: pod-network-partition
|
||||||
|
CSV: pod-network-partition.chartserviceversion.yaml
|
||||||
|
desc: "pod-network-partition"
|
||||||
|
- name: pod-http-latency
|
||||||
|
CSV: pod-http-latency.chartserviceversion.yaml
|
||||||
|
desc: "pod-http-latency"
|
BIN
experiments/generic/icons/byoc-pod-delete.png
Normal file
After Width: | Height: | Size: 959 B |
BIN
experiments/generic/icons/container-kill.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
experiments/generic/icons/disk-fill.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
experiments/generic/icons/docker-service-kill.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
experiments/generic/icons/generic.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
experiments/generic/icons/kubelet-service-kill.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
experiments/generic/icons/node-cpu-hog.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
experiments/generic/icons/node-drain.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
experiments/generic/icons/node-io-stress.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
experiments/generic/icons/node-memory-hog.png
Normal file
After Width: | Height: | Size: 1.5 KiB |