refactors directory and file structure
Signed-off-by: neelanjan00 <neelanjan.manna@harness.io>
@@ -0,0 +1,32 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-26T10:28:08Z
|
||||
name: aws-az-chaos
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kube AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: AWS AZ Chaos
|
||||
categoryDescription: |
|
||||
Execute AWS AZ chaos to detach the target zones from the load balancer for a certain chaos duration.
|
||||
keywords:
|
||||
- AWS
|
||||
platforms:
|
||||
- GKE
|
||||
- Packet(Kubeadm)
|
||||
- Minikube
|
||||
- EKS
|
||||
- AKS
|
||||
minKubeVersion: 1.12.0
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
28
faults/aws/aws-az-chaos/engine.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: az-chaos-engine
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
experiments:
|
||||
- name: aws-az-chaos
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
#LOAD_BALANCER_NAME name of the load balancer
|
||||
- name: LOAD_BALANCER_NAME
|
||||
value: ""
|
||||
#LOAD_BALANCER_ZONES can be multiple, provide it by comma separated
|
||||
- name: LOAD_BALANCER_ZONES
|
||||
value: ""
|
||||
- name: LOAD_BALANCERNAME_ARN
|
||||
value: "na"
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: "/tmp/cloud_config.yml"
|
77
faults/aws/aws-az-chaos/fault.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
It injects AZ chaos to detach the target zones from the load balancer.
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: aws-az-chaos
|
||||
labels:
|
||||
name: aws-az-chaos
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: ci
|
||||
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 & 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/py-runner:latest"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- python3 -u experiment -name aws-az-chaos
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
- name: LIB
|
||||
value: 'litmus'
|
||||
- name: LOAD_BALANCER_NAME
|
||||
value: ''
|
||||
- name: LOAD_BALANCER_ZONES
|
||||
value: ''
|
||||
- name: LOAD_BALANCERNAME_ARN
|
||||
value: 'na'
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: "/tmp/cloud_config.yml"
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
labels:
|
||||
name: aws-az-chaos
|
||||
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,30 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-27T10:28:08Z
|
||||
name: aws-ssm-chaos-by-id
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: AWS SSM Chaos By ID
|
||||
categoryDescription: |
|
||||
AWS SSM Chaos By ID fault disrupts the state of infra resources. The fault induces 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 faults 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:
|
||||
- AWS
|
||||
platforms:
|
||||
- AWS
|
||||
chaosType: infra
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
39
faults/aws/aws-ssm-chaos-by-id/engine.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: aws-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
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'
|
128
faults/aws/aws-ssm-chaos-by-id/fault.yaml
Normal file
@@ -0,0 +1,128 @@
|
||||
---
|
||||
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: ci
|
||||
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 commands 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: "chaosnative/go-runner:ci"
|
||||
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 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 consumed
|
||||
# 0 will consume all the available CPU cores
|
||||
- name: CPU_CORE
|
||||
value: '0'
|
||||
|
||||
- name: DEFAULT_HEALTH_CHECK
|
||||
value: 'false'
|
||||
|
||||
# Provide the name of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_NAME
|
||||
value: 'LitmusChaos-AWS-SSM-Doc'
|
||||
|
||||
# Provide the type of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_TYPE
|
||||
value: 'Command'
|
||||
|
||||
# Provide the format of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_FORMAT
|
||||
value: 'YAML'
|
||||
|
||||
# Provide the path of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_PATH
|
||||
value: 'Litmus-AWS-SSM-Docs-For-EC2-CPU-Hog.yml'
|
||||
|
||||
# if you want to install dependencies to run default SSM docs
|
||||
- name: INSTALL_DEPENDENCIES
|
||||
value: 'True'
|
||||
|
||||
labels:
|
||||
name: aws-ssm-chaos-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-27T10:28:08Z
|
||||
name: aws-ssm-chaos-by-tag
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: AWS SSM Chaos By Tag
|
||||
categoryDescription: |
|
||||
AWS SSM Chaos By Tag fault disrupts the state of infra resources. The fault induces 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 faults 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:
|
||||
- AWS
|
||||
platforms:
|
||||
- AWS
|
||||
chaosType: infra
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
39
faults/aws/aws-ssm-chaos-by-tag/engine.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: nginx-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
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'
|
132
faults/aws/aws-ssm-chaos-by-tag/fault.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
---
|
||||
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: ci
|
||||
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 commands 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: "chaosnative/go-runner:ci"
|
||||
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 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'
|
||||
|
||||
- name: DEFAULT_HEALTH_CHECK
|
||||
value: 'false'
|
||||
|
||||
# Provide the name of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_NAME
|
||||
value: 'LitmusChaos-AWS-SSM-Doc'
|
||||
|
||||
# Provide the type of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_TYPE
|
||||
value: 'Command'
|
||||
|
||||
# Provide the format of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_FORMAT
|
||||
value: 'YAML'
|
||||
|
||||
# Provide the path of SSM doc
|
||||
# if not using the default stress docs
|
||||
- name: DOCUMENT_PATH
|
||||
value: 'Litmus-AWS-SSM-Docs-For-EC2-CPU-Hog.yml'
|
||||
|
||||
# if you want to install dependencies to run default SSM docs
|
||||
- name: INSTALL_DEPENDENCIES
|
||||
value: 'True'
|
||||
|
||||
labels:
|
||||
name: aws-ssm-chaos-by-tag
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
51
faults/aws/aws.chartserviceversion.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: aws
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
chartDescription: Injects faults on AWS services
|
||||
executionPlane: "kubernetes"
|
||||
spec:
|
||||
displayName: AWS
|
||||
categoryDescription: >
|
||||
AWS chaos contains different faults for AWS cloud provider to test the app/platform service availability. It uses AWS command to carry the fault logic in the instance. It will install all the faults which can be used to inject chaos into the AWS services like EC2, ECS, S3 and so on.
|
||||
faults:
|
||||
- name: alb-az-down
|
||||
description: It injects AZ down chaos on ALB for a certain chaos duration.
|
||||
displayName: "ALB AZ Down"
|
||||
- name: aws-ssm-chaos-by-id
|
||||
description: It allow to perform in-VM chaos using AWS SSM service and EC2 instance ID.
|
||||
displayName: "AWS SSM Chaos By ID"
|
||||
- name: aws-ssm-chaos-by-tag
|
||||
description: It allow to perform in-VM chaos using AWS SSM service and EC2 instance tag.
|
||||
displayName: "AWS SSM Chaos By Tag"
|
||||
- name: ec2-terminate-by-id
|
||||
description: It stops the AWS EC2 instance identified by ID for a certain chaos duration.
|
||||
displayName: "EC2 Stop By ID"
|
||||
- name: ec2-terminate-by-tag
|
||||
description: It stops the AWS EC2 instance identified by Tag for a certain chaos duration.
|
||||
displayName: "EC2 Stop By Tag"
|
||||
- name: ebs-loss-by-id
|
||||
description: It detach the EBS volume from AWS EC2 instance identified by ID for a certain chaos duration.
|
||||
displayName: "EBS Loss By ID"
|
||||
- name: ebs-loss-by-tag
|
||||
description: It detach the EBS volume from AWS EC2 instance identified by Tag for a certain chaos duration.
|
||||
displayName: "EBS Loss By Tag"
|
||||
keywords:
|
||||
- AWS
|
||||
minKubeVersion: 1.12.0
|
||||
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: ""
|
||||
icon:
|
||||
- url: https://raw.githubusercontent.com/litmuschaos/charthub.litmuschaos.io/master/public/litmus.ico
|
||||
mediatype: image/png
|
24
faults/aws/aws.package.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
packageName: aws
|
||||
faults:
|
||||
- name: alb-az-down
|
||||
CSV: alb-az-down.chartserviceversion.yaml
|
||||
desc: "alb-az-down"
|
||||
- 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"
|
||||
- name: ec2-terminate-by-id
|
||||
CSV: ec2-terminate-by-id.chartserviceversion.yaml
|
||||
desc: "ec2-terminate-by-id"
|
||||
- name: ec2-terminate-by-tag
|
||||
CSV: ec2-terminate-by-tag.chartserviceversion.yaml
|
||||
desc: "ec2-terminate-by-tag"
|
||||
- name: ebs-loss-by-id
|
||||
CSV: ebs-loss-by-id.chartserviceversion.yaml
|
||||
desc: "ebs-loss-by-id"
|
||||
- name: ebs-loss-by-tag
|
||||
CSV: ebs-loss-by-tag.chartserviceversion.yaml
|
||||
desc: "ebs-loss-by-tag"
|
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-28T10:28:08Z
|
||||
name: ebs-loss-by-id
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: EBS Loss By ID
|
||||
categoryDescription: |
|
||||
EBS Loss By ID fault disrupts state of infra resources. The fault induces EBS volume loss against specified application for the give EBS Volume(s).
|
||||
- Causes EBS volume loss from node or EC2 instance for a certain chaos interval from total chaos duration.
|
||||
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod.
|
||||
keywords:
|
||||
- AWS
|
||||
platforms:
|
||||
- AWS
|
||||
chaosType: infra
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
29
faults/aws/ebs-loss-by-id/engine.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: aws-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
experiments:
|
||||
- name: ebs-loss-by-id
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
# set target EBS volume ID
|
||||
- name: EBS_VOLUME_ID
|
||||
value: ''
|
||||
|
||||
# provide the region name of the instance
|
||||
- name: REGION
|
||||
value: ''
|
87
faults/aws/ebs-loss-by-id/fault.yaml
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Detaching an EBS volume from EC2 instance for a certain chaos duration.
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: ebs-loss-by-id
|
||||
labels:
|
||||
name: ebs-loss-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: ci
|
||||
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 commands 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: "chaosnative/go-runner:ci"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name ebs-loss-by-id
|
||||
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: ''
|
||||
|
||||
- name: EBS_VOLUME_ID
|
||||
value: ''
|
||||
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
- name: DEFAULT_HEALTH_CHECK
|
||||
value: 'false'
|
||||
|
||||
# Provide the path of AWS credentials mounted from secret
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: '/tmp/cloud_config.yml'
|
||||
|
||||
labels:
|
||||
name: ebs-loss-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-28T10:28:08Z
|
||||
name: ebs-loss-by-tag
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: EBS Loss By Tag
|
||||
categoryDescription: |
|
||||
EBS Loss By Tag fault disrupts state of infra resources. The fault induces EBS volume loss against specified application for given volume tag.
|
||||
- Causes EBS volume loss by tag from node or EC2 instance for certain chaos interval from total chaos duration.
|
||||
- Tests deployment sanity (replica availability & uninterrupted service) and recovery workflows of the application pod.
|
||||
keywords:
|
||||
- AWS
|
||||
platforms:
|
||||
- AWS
|
||||
chaosType: infra
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
32
faults/aws/ebs-loss-by-tag/engine.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: aws-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
experiments:
|
||||
- name: ebs-loss-by-tag
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
# provide EBS volume tag attached to the given instance
|
||||
# it'll be in form of key:value (ex: 'team:devops')
|
||||
- name: EBS_VOLUME_TAG
|
||||
value: ''
|
||||
|
||||
# provide the region name of the instance
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
- name: VOLUME_AFFECTED_PERC
|
||||
value: ''
|
89
faults/aws/ebs-loss-by-tag/fault.yaml
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Detaching an EBS volume from EC2 instance.
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: ebs-loss-by-tag
|
||||
labels:
|
||||
name: ebs-loss-by-tag
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: ci
|
||||
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 commands 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: "chaosnative/go-runner:ci"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name ebs-loss-by-tag
|
||||
command:
|
||||
- /bin/bash
|
||||
env:
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
- name: RAMP_TIME
|
||||
value: ''
|
||||
|
||||
- name: EBS_VOLUME_TAG
|
||||
value: ''
|
||||
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
- name: VOLUME_AFFECTED_PERC
|
||||
value: ''
|
||||
|
||||
- name: DEFAULT_HEALTH_CHECK
|
||||
value: 'false'
|
||||
|
||||
# Provide the path of AWS credentials mounted from secret
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: '/tmp/cloud_config.yml'
|
||||
|
||||
labels:
|
||||
name: ebs-loss-by-tag
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-27T10:28:08Z
|
||||
name: ec2-stop-by-tag
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: EC2 Stop By Tag
|
||||
categoryDescription: |
|
||||
This fault causes termination of an EC2 instance for a certain chaos duration.
|
||||
- Causes termination of an EC2 instance using instance tags before bringing it back to running state after the specified chaos duration.
|
||||
- It helps to check the performance of the application on the EC2 instance.
|
||||
keywords:
|
||||
- AWS
|
||||
platforms:
|
||||
- AWS
|
||||
chaosType: infra
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
38
faults/aws/ec2-stop-by-tag/engine.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: aws-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
experiments:
|
||||
- name: ec2-stop-by-tag
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
# set interval duration (in sec) as desired
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
# Instance Tag of the target EC2 instances
|
||||
# ex: team:devops (key:value)
|
||||
- name: EC2_INSTANCE_TAG
|
||||
value: ''
|
||||
|
||||
# provide the region name of the instance
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
# enable it if the target instance is a part of self-managed nodegroup.
|
||||
- name: MANAGED_NODEGROUP
|
||||
value: 'disable'
|
||||
|
||||
# Target the percentage of instance filtered from tag
|
||||
- name: INSTANCE_AFFECTED_PERC
|
||||
value: ''
|
103
faults/aws/ec2-stop-by-tag/fault.yaml
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Stopping an EC2 instance identified by tag.
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: ec2-stop-by-tag
|
||||
labels:
|
||||
name: ec2-stop-by-tag
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: ci
|
||||
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 commands 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: "chaosnative/go-runner:ci"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name ec2-stop-by-tag
|
||||
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 a common tag to target ec2 instances
|
||||
- name: EC2_INSTANCE_TAG
|
||||
value: ''
|
||||
|
||||
# enable it if the target instance is a part of self-managed nodegroup.
|
||||
- name: MANAGED_NODEGROUP
|
||||
value: 'disable'
|
||||
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
# Target the percentage of instance filtered from tag
|
||||
- name: INSTANCE_AFFECTED_PERC
|
||||
value: ''
|
||||
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
- name: DEFAULT_HEALTH_CHECK
|
||||
value: 'false'
|
||||
|
||||
# Provide the path of AWS credentials mounted from secret
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: '/tmp/cloud_config.yml'
|
||||
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
labels:
|
||||
name: ec2-stop-by-tag
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
createdAt: 2022-07-27T10:28:08Z
|
||||
name: ec2-terminate-by-id
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: AWS
|
||||
vendor: Harness
|
||||
spec:
|
||||
displayName: EC2 Terminate By ID
|
||||
categoryDescription: |
|
||||
This fault causes termination of an EC2 instance for a certain chaos duration.
|
||||
- Causes termination of an EC2 instance provided by instance ID before bringing it back to running state after the specified chaos duration.
|
||||
- It helps to check the performance of the application on the EC2 instances.
|
||||
keywords:
|
||||
- AWS
|
||||
platforms:
|
||||
- AWS
|
||||
chaosType: infra
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: ci
|
||||
links:
|
||||
- name: Documentation
|
||||
url: https://docs.harness.io/category/kl0mxwpfw1-hce-category
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
34
faults/aws/ec2-terminate-by-id/engine.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: aws-chaos
|
||||
namespace: default
|
||||
spec:
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: litmus-admin
|
||||
experiments:
|
||||
- name: ec2-terminate-by-id
|
||||
spec:
|
||||
components:
|
||||
env:
|
||||
# set chaos duration (in sec) as desired
|
||||
- name: TOTAL_CHAOS_DURATION
|
||||
value: '30'
|
||||
|
||||
# set interval duration (in sec) as desired
|
||||
- name: CHAOS_INTERVAL
|
||||
value: '30'
|
||||
|
||||
# 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 instance
|
||||
- name: REGION
|
||||
value: ''
|
||||
|
||||
# enable it if the target instance is a part of self-managed nodegroup.
|
||||
- name: MANAGED_NODEGROUP
|
||||
value: 'disable'
|
97
faults/aws/ec2-terminate-by-id/fault.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
---
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Stopping an EC2 instance identified by ID.
|
||||
kind: ChaosExperiment
|
||||
metadata:
|
||||
name: ec2-terminate-by-id
|
||||
labels:
|
||||
name: ec2-terminate-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: chaosexperiment
|
||||
app.kubernetes.io/version: ci
|
||||
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 commands 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: "chaosnative/go-runner:ci"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- -c
|
||||
- ./experiments -name ec2-terminate-by-id
|
||||
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: ''
|
||||
|
||||
- name: DEFAULT_HEALTH_CHECK
|
||||
value: 'false'
|
||||
|
||||
# enable it if the target instance is a part of self-managed nodegroup.
|
||||
- name: MANAGED_NODEGROUP
|
||||
value: 'disable'
|
||||
|
||||
# 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: ''
|
||||
|
||||
- name: SEQUENCE
|
||||
value: 'parallel'
|
||||
|
||||
# Provide the path of AWS credentials mounted from secret
|
||||
- name: AWS_SHARED_CREDENTIALS_FILE
|
||||
value: '/tmp/cloud_config.yml'
|
||||
|
||||
labels:
|
||||
name: ec2-terminate-by-id
|
||||
app.kubernetes.io/part-of: litmus
|
||||
app.kubernetes.io/component: experiment-job
|
||||
app.kubernetes.io/version: ci
|
||||
secrets:
|
||||
- name: cloud-secret
|
||||
mountPath: /tmp/
|
BIN
faults/aws/icons/alb-az-down.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
faults/aws/icons/aws-ssm-chaos-by-id.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
faults/aws/icons/aws-ssm-chaos-by-tag.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
faults/aws/icons/ebs-loss-by-id.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
faults/aws/icons/ebs-loss-by-tag.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
faults/aws/icons/ec2-terminate-by-id.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
faults/aws/icons/ec2-terminate-by-tag.png
Normal file
After Width: | Height: | Size: 61 KiB |