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>
This commit is contained in:
35
experiments/kube-aws/aws-az-chaos/aws-az-chaos.chartserviceversion.yaml
Executable file
35
experiments/kube-aws/aws-az-chaos/aws-az-chaos.chartserviceversion.yaml
Executable file
@@ -0,0 +1,35 @@
|
||||
apiVersion: litmuchaos.io/v1alpha1
|
||||
kind: ChartServiceVersion
|
||||
metadata:
|
||||
name: aws-az-chaos
|
||||
version: 0.1.0
|
||||
annotations:
|
||||
categories: Kubernetes
|
||||
vendor: CNCF
|
||||
support: https://slack.kubernetes.io/
|
||||
spec:
|
||||
displayName: aws-az-chaos
|
||||
categoryDescription: >
|
||||
Execute aws-az chaos to detach the target zones from the load balancer
|
||||
keywords:
|
||||
- "zone"
|
||||
- "load-balancer"
|
||||
- "aws"
|
||||
platforms:
|
||||
- "AWS"
|
||||
maturity: alpha
|
||||
maintainers:
|
||||
- name: oumkale
|
||||
email: imkaleoum@gmail.com
|
||||
labels:
|
||||
app.kubernetes.io/component: chartserviceversion
|
||||
app.kubernetes.io/version: latest
|
||||
links:
|
||||
- name: Source Code
|
||||
url: https://github.com/litmuschaos/litmus-python/tree/master/experiments/aws_az
|
||||
- name: Documentation
|
||||
url: https://litmuschaos.github.io/litmus/experiments/categories/aws/aws-az-chaos/
|
||||
icon:
|
||||
- url:
|
||||
mediatype: ""
|
||||
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/kube-aws/aws-az-chaos/experiment.yaml
|
27
experiments/kube-aws/aws-az-chaos/engine.yaml
Executable file
27
experiments/kube-aws/aws-az-chaos/engine.yaml
Executable file
@@ -0,0 +1,27 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
kind: ChaosEngine
|
||||
metadata:
|
||||
name: aws-az-chaos
|
||||
spec:
|
||||
# It can be active/stop
|
||||
engineState: 'active'
|
||||
chaosServiceAccount: aws-az-chaos-sa
|
||||
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"
|
76
experiments/kube-aws/aws-az-chaos/experiment.yaml
Executable file
76
experiments/kube-aws/aws-az-chaos/experiment.yaml
Executable file
@@ -0,0 +1,76 @@
|
||||
apiVersion: litmuschaos.io/v1alpha1
|
||||
description:
|
||||
message: |
|
||||
Execute aws-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: 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 & 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/
|
60
experiments/kube-aws/aws-az-chaos/rbac.yaml
Executable file
60
experiments/kube-aws/aws-az-chaos/rbac.yaml
Executable file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: aws-az-chaos-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: aws-az-chaos-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: aws-az-chaos-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: aws-az-chaos-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 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/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: aws-az-chaos-sa
|
||||
namespace: default
|
||||
labels:
|
||||
name: aws-az-chaos-sa
|
||||
app.kubernetes.io/part-of: litmus
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: aws-az-chaos-sa
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: aws-az-chaos-sa
|
||||
namespace: default
|
Reference in New Issue
Block a user