apiVersion: litmuschaos.io/v1alpha1 description: message: | Detaching an ebs volume from ec2 instance. 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: latest spec: definition: scope: Cluster permissions: - apiGroups: - "" - "batch" - "litmuschaos.io" resources: - "jobs" - "pods" - "events" - "pods/log" - "pods/exec" - "secrets" - "chaosengines" - "chaosexperiments" - "chaosresults" verbs: - "create" - "list" - "get" - "patch" - "update" - "delete" image: "litmuschaos/go-runner:latest" 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: '' # 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' # provide the LIB # only litmus supported - name: LIB value: 'litmus' labels: name: ec2-terminate-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: | Deletes an aws instance belonging to a deployment/statefulset/daemonset kind: ChaosExperiment metadata: name: k8-aws-ec2-terminate labels: name: k8-aws-ec2-terminate app.kubernetes.io/part-of: litmus app.kubernetes.io/component: chaosexperiment app.kubernetes.io/version: latest spec: definition: scope: Namespaced permissions: - apiGroups: - "" - "apps" - "batch" - "litmuschaos.io" resources: - "deployments" - "jobs" - "pods" - "configmaps" - "chaosengines" - "chaosexperiments" - "chaosresults" verbs: - "create" - "list" - "get" - "patch" - "update" - "delete" - apiGroups: - "" resources: - "nodes" verbs : - "get" - "list" image: "litmuschaos/chaostoolkit:latest" args: - -c - python /app/chaos/chaostest/aws/aws_wrapper.py ; exit 0 command: - /bin/bash env: - name: CHAOSTOOLKIT_IN_POD value: 'true' - name: FILE value: 'ec2-delete.json' - name: NAME_SPACE value: 'default' - name: LABEL_NAME value: 'app=nginx' - name: APP_ENDPOINT value: 'localhost' # Period to wait before injection of chaos in sec - name: PERCENTAGE value: '50' # Variable to set for custom report upload - name: REPORT value: 'false' # Variable to set for report upload endpoint - name: REPORT_ENDPOINT value: 'none' # Variable to set for AWS account - name: AWS_ACCOUNT value: '000000000000' # Variable to set for AWS role, Make sure you have created this role and have give access - name: AWS_ROLE value: 'chaosec2access' # Variable to set for AWS region - name: AWS_REGION value: 'us-west-2' # Variable to set for AWS AZ - name: AWS_AZ value: 'us-west-2c' # Variable to set for AWS RESOURCE - name: AWS_RESOURCE value: 'ec2-iks' # Variable to set for AWS SSL - name: AWS_SSL value: 'false' # Variable which indicates where the test results CRs will be persisted - name: TEST_NAMESPACE value: 'default' labels: name: k8-aws-ec2-terminate app.kubernetes.io/part-of: litmus app.kubernetes.io/component: experiment-job app.kubernetes.io/version: latest --- apiVersion: litmuschaos.io/v1alpha1 description: message: | Detaching an ebs volume from ec2 instance. kind: ChaosExperiment metadata: name: ebs-loss labels: name: ebs-loss app.kubernetes.io/part-of: litmus app.kubernetes.io/component: chaosexperiment app.kubernetes.io/version: latest spec: definition: scope: Cluster permissions: - apiGroups: - "" - "batch" - "litmuschaos.io" resources: - "jobs" - "pods" - "events" - "pods/log" - "pods/exec" - "secrets" - "chaosengines" - "chaosexperiments" - "chaosresults" verbs: - "create" - "list" - "get" - "patch" - "update" - "delete" image: "litmuschaos/go-runner:latest" imagePullPolicy: Always args: - -c - ./experiments -name ebs-loss command: - /bin/bash env: - name: TOTAL_CHAOS_DURATION value: '60' # Period to wait before and after injection of chaos in sec - name: RAMP_TIME value: '' - name: EC2_INSTANCE_ID value: '' - name: EBS_VOL_ID value: '' - name: REGION value: '' # Provide the path of aws credentials mounted from secret - name: AWS_SHARED_CREDENTIALS_FILE value: '/tmp/cloud_config.yml' # provide the LIB # only litmus supported - name: LIB value: 'litmus' - name: DEVICE_NAME value: '' labels: name: ebs-loss 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: | Detaching an ebs volume from ec2 instance. kind: ChaosExperiment metadata: name: ec2-terminate-by-tag labels: name: ec2-terminate-by-tag app.kubernetes.io/part-of: litmus app.kubernetes.io/component: chaosexperiment app.kubernetes.io/version: latest spec: definition: scope: Cluster permissions: - apiGroups: - "" - "batch" - "litmuschaos.io" resources: - "jobs" - "pods" - "events" - "pods/log" - "pods/exec" - "secrets" - "chaosengines" - "chaosexperiments" - "chaosresults" verbs: - "create" - "list" - "get" - "patch" - "update" - "delete" image: "litmuschaos/go-runner:latest" imagePullPolicy: Always args: - -c - ./experiments -name ec2-terminate-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: '' # 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' # Provide the path of aws credentials mounted from secret - name: AWS_SHARED_CREDENTIALS_FILE value: '/tmp/cloud_config.yml' # provide the LIB # only litmus supported - name: LIB value: 'litmus' labels: name: ec2-terminate-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/ ---