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:
Amit Kumar Das
2022-07-15 17:30:39 +05:30
committed by GitHub
parent 15a0ec5d48
commit 7adf5d35a1
382 changed files with 24112 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: vmware-vm-chaos
namespace: default
spec:
# It can be active/stop
engineState: 'active'
#ex. values: ns1:name=percona,ns2:run=nginx
auxiliaryAppInfo: ''
chaosServiceAccount: vm-poweroff-sa
experiments:
- name: vm-poweroff
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 VM MOIDs as comma separated values
- name: APP_VM_MOIDS
value: ''

View File

@@ -0,0 +1,97 @@
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Stops one or more VMs for a certain chaos duration.
kind: ChaosExperiment
metadata:
name: vm-poweroff
labels:
name: vm-poweroff
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"
args:
- -c
- ./experiments -name vm-poweroff
command:
- /bin/bash
env:
- name: VCENTERSERVER
valueFrom:
secretKeyRef:
name: vcenter-secret
key: VCENTERSERVER
- name: VCENTERUSER
valueFrom:
secretKeyRef:
name: vcenter-secret
key: VCENTERUSER
- name: VCENTERPASS
valueFrom:
secretKeyRef:
name: vcenter-secret
key: VCENTERPASS
# provide the VM MOIDs as comma separated values
- name: APP_VM_MOIDS
value: ''
# 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: LIB
value: 'litmus'
- name: RAMP_TIME
value: ''
# parallel or sequence; the mode of chaos sequence, defaults to parallel
- name: SEQUENCE
value: 'parallel'
labels:
experiment: vm-poweroff
app.kubernetes.io/part-of: litmus
app.kubernetes.io/component: experiment-job
app.kubernetes.io/version: latest

View File

@@ -0,0 +1,63 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: vm-poweroff-sa
namespace: default
labels:
name: vm-poweroff-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: vm-poweroff-sa
labels:
name: vm-poweroff-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: vm-poweroff-sa
labels:
name: vm-poweroff-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: vm-poweroff-sa
subjects:
- kind: ServiceAccount
name: vm-poweroff-sa
namespace: default

View File

@@ -0,0 +1,42 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
createdAt: 2021-04-29T10:28:08Z
name: vm-poweroff
annotations:
categories: vmware
vendor: Wipro, ChaosNative
support: https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN
spec:
displayName: vm-poweroff
categoryDescription: |
This experiment causes power-off of target VMWare VM(s) for a certain chaos duration:
- Causes power-off of the VMWare VM(s) provided by the Moid(s) of the instance.
- It helps to check the performance of the application/services on the instance.
- Currently, the experiment is supported for vsphere version 6.X (Support for 7.X will be added soon).
keywords:
- Vmware
- VM
platforms:
- vmware
maturity: alpha
maintainers:
- name: Delphine Joyneer, Neelanjan Manna
email: golkonda.joyneer@wipro.com, neelanjan@chaosnative.com
provider:
name: Wipro, 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/vmware/vm-poweroff
- name: Documentation
url: https://litmuschaos.github.io/litmus/experiments/categories/vmware/vm-poweroff/
- name: Video
url:
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/vmware/vm-poweroff/experiment.yaml