Compare commits

..

2 Commits

Author SHA1 Message Date
Vedant Shrotria fe9eb5f361
Cherry-pick for v2.5.0 (#524)
* Update charts to v2.5.0

Signed-off-by: Jonsy13 <vedant.shrotria@chaosnative.com>

* Update charts to v2.5.0

Signed-off-by: Jonsy13 <vedant.shrotria@chaosnative.com>
2022-01-15 17:31:03 +05:30
Udit Gaurav cfb04174c0
Add jitter to pod network latency experiment (#522) (#523)
Signed-off-by: uditgaurav <udit@chaosnative.com>
2022-01-15 16:40:53 +05:30
668 changed files with 27298 additions and 21658 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

215
.gitignore vendored
View File

@ -1,215 +0,0 @@
# Created by https://www.toptal.com/developers/gitignore/api/git,visualstudiocode,goland+all,jetbrains+all,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=git,visualstudiocode,goland+all,jetbrains+all,macos
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt
### GoLand+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### GoLand+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.
.idea/*
!.idea/codeStyles
!.idea/runConfigurations
### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# AWS User-specific
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# SonarLint plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### JetBrains+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### VisualStudioCode ###
.vscode/
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# End of https://www.toptal.com/developers/gitignore/api/git,visualstudiocode,goland+all,jetbrains+all,macos

View File

@ -10,6 +10,8 @@ Chaos Charts are a groups of categorized chaos experiments, represented as custo
- <b>Generic</b>: It contains chaos to disrupt state of kubernetes resources. i.e, pod-delete
- <b>OpenEBS</b>: It contains chaos to disrupt state of OpenEBS control/date plane components. i.e, openebs-target-failure
- <b>Cassandra</b>: It contains chaos to disrupt state of Cassandra Applications. i.e, cassandra-pod-delete
- <b>Kafka</b>: It contains chaos to disrupt state of Kafka Applications. i.e, kafka-broker-pod-delete
- <b>Coredns</b>: It contains chaos to disrupt state of Coredns pod. i.e, coredns-pod-delete
- <b>Kube-AWS</b>: It contains chaos to disrupt state of AWS resources running part of the kubernetes cluster. i.e, ebs-loss
- <b>Kube-Components</b>: It contains chaos to disrupt the state of kubernetes components. i.e, k8-kube-proxy.

117
README.md
View File

@ -7,212 +7,223 @@
[![YouTube Channel](https://img.shields.io/badge/YouTube-Subscribe-red)](https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw)
<br><br>
This repository hosts the Litmus Chaos Charts. A set of related chaos faults are bundled into a Chaos Chart. Chaos Charts are classified into the following categories.
This repository hosts the Litmus Chaos Charts. A set of related chaos experiments are bundled into a Chaos Chart. Chaos Charts are classified into the following categories.
- [Kubernetes Chaos](#kubernetes-chaos)
- [Generic Chaos](#generic-chaos)
- [Application Chaos](#application-chaos)
- [Platform Chaos](#platform-chaos)
### Kubernetes Chaos
### Generic Chaos
Chaos faults that apply to Kubernetes resources are classified in this category. Following chaos faults are supported for Kubernetes:
Chaos actions that apply to generic Kubernetes resources are classified into this category. Following chaos experiments are supported under Generic Chaos Chart
<table>
<tr>
<th> Fault Name </th>
<th> Experiment Name </th>
<th> Description </th>
<th> Link </th>
</tr>
<tr>
<td> Container Kill </td>
<td> Kill one container in the application pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/container-kill"> container-kill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/container-kill"> container-kill </a></td>
<tr>
<tr>
<td> Disk Fill </td>
<td> Fill the Ephemeral Storage of the Pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/disk-fill"> disk-fill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/disk-fill"> disk-fill </a></td>
<tr>
<tr>
<td> Docker Service Kill </td>
<td> Kill docker service of the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/docker-service-kill"> docker-service-kill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/docker-service-kill"> docker-service-kill </a></td>
<tr>
<tr>
<td> Kubelet Service Kill </td>
<td> Kill kubelet service of the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/kubelet-service-kill"> kubelet-service-kill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/kubelet-service-kill"> kubelet-service-kill </a></td>
<tr>
<tr>
<td> Node CPU Hog </td>
<td> Stress the cpu of the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/node-cpu-hog"> node-cpu-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/node-cpu-hog"> node-cpu-hog </a></td>
<tr>
<tr>
<td> Node Drain </td>
<td> Drain the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/node-drain"> node-drain </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/node-drain"> node-drain </a></td>
<tr>
<tr>
<td> Node IO Stress </td>
<td> Stress the IO of the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/node-io-stress"> node-io-stress </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/node-io-stress"> node-io-stress </a></td>
<tr>
<tr>
<td> Node Memory Hog </td>
<td> Stress the memory of the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/node-memory-hog"> node-memory-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/node-memory-hog"> node-memory-hog </a></td>
<tr>
<tr>
<td> Node Restart </td>
<td> Restart the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/node-restart"> node-restart </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/node-restart"> node-restart </a></td>
<tr>
<tr>
<td> Node Taint </td>
<td> Taint the target node </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/node-taint"> node-taint </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/node-taint"> node-taint </a></td>
<tr>
<tr>
<td> Pod Autoscaler </td>
<td> Scale the replicas of the target application </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-autoscaler"> pod-autoscaler </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-autoscaler"> pod-autoscaler </a></td>
<tr>
<tr>
<td> Pod CPU Hog </td>
<td> Stress the CPU of the target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-cpu-hog"> pod-cpu-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-cpu-hog"> pod-cpu-hog </a></td>
<tr>
<tr>
<td> Pod Delete </td>
<td> Delete the target pods </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-delete"> pod-delete </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-delete"> pod-delete </a></td>
<tr>
<tr>
<td> Pod DNS Spoof </td>
<td> Spoof dns requests to desired target hostnames </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-dns-spoof"> pod-dns-spoof </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-dns-spoof"> pod-dns-spoof </a></td>
<tr>
<tr>
<td> Pod DNS Error </td>
<td> Error the dns requests of the target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-dns-error"> pod-dns-error </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-dns-error"> pod-dns-error </a></td>
<tr>
<tr>
<td> Pod IO Stress </td>
<td> Stress the IO of the target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-io-stress"> pod-io-stress </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-io-stress"> pod-io-stress </a></td>
<tr>
<tr>
<td> Pod Memory Hog </td>
<td> Stress the memory of the target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-memory-hog"> pod-memory-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-memory-hog"> pod-memory-hog </a></td>
<tr>
<tr>
<td> Pod Network Latency </td>
<td> Induce the network latency in target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-network-latency"> pod-network-latency </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-network-latency"> pod-network-latency </a></td>
<tr>
<tr>
<td> Pod Network Corruption </td>
<td> Induce the network packet corruption in target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-network-corruption"> pod-network-corruption </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-network-corruption"> pod-network-corruption </a></td>
<tr>
<tr>
<td> Pod Network Duplication </td>
<td> Induce the network packet duplication in target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-network-duplication"> pod-network-duplication </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-network-duplication"> pod-network-duplication </a></td>
<tr>
<tr>
<td> Pod Network Loss </td>
<td> Induce the network loss in target pod </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-network-loss"> pod-network-loss </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-network-loss"> pod-network-loss </a></td>
<tr>
<tr>
<td> Pod Network Partition </td>
<td> Disrupt network connectivity to kubernetes pods </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-network-partition"> pod-network-partition </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/pod-network-partition"> pod-network-partition </a></td>
<tr>
</table>
### Application Chaos
While chaos faults under the Kubernetes category offer the ability to induce chaos into Kubernetes resources, it is difficult to analyze and conclude if the induced chaos found a weakness in a given application. The application specific chaos faults are built with some checks on *pre-conditions* and some expected outcomes after the chaos injection. The result of the chaos faults is determined by matching the outcome with the expected outcome.
While Chaos Experiments under the Generic category offer the ability to induce chaos into Kubernetes resources, it is difficult to analyze and conclude if the chaos induced found a weakness in a given application. The application specific chaos experiments are built with some checks on *pre-conditions* and some expected outcomes after the chaos injection. The result of the chaos experiment is determined by matching the outcome with the expected outcome.
<table>
<tr>
<th> Fault Category </th>
<th> Experiment Name </th>
<th> Description </th>
<th> Link </th>
</tr>
<tr>
<td> Spring Boot Faults </td>
<td> Injects faults in Spring Boot applications </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/spring-boot"> Spring Boot Faults</a></td>
<td> OpenEBS Experiments </td>
<td> Injects faults in OpenEBS tool </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/openebs"> OpenEBS experiments</a></td>
<tr>
<tr>
<td> Kafka Experiments </td>
<td> Inject faults in kafka application </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/kafka"> kafka experiments </a></td>
<tr>
<tr>
<td> Cassandra Experiments </td>
<td> Inject faults in cassandra application </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/cassandra"> cassandra experiments </a></td>
<tr>
</table>
### Platform Chaos
Chaos faults that inject chaos into the platform and infrastructure resources are classified into this category. Management of platform resources vary significantly from each other, Chaos Charts may be maintained separately for each platform (For example: AWS, GCP, Azure, VMWare etc.)
Chaos experiments that inject chaos into the platform resources of Kubernetes are classified into this category. Management of platform resources vary significantly from each other, Chaos Charts may be maintained separately for each platform (For example, AWS, GCP, Azure, VMWare etc)
Following chaos faults are classified in this category:
Following Platform Chaos experiments are available on ChaosHub
<table>
<tr>
<th> Fault Category </th>
<th> Experiment Name </th>
<th> Description </th>
<th> Link </th>
</tr>
<tr>
<td> AWS Faults </td>
<td> AWS Experiments </td>
<td> AWS Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/aws"> AWS Faults </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/kube-aws"> AWS Experiments </a></td>
<tr>
<tr>
<td> Azure Faults </td>
<td> Azure Experiments </td>
<td> Azure Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/azure"> Azure Faults </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/azure"> Azure Experiments </a></td>
<tr>
<tr>
<td> GCP Faults </td>
<td> GCP Experiments </td>
<td> GCP Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/gcp"> GCP Faults </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/gcp"> GCP Experiments </a></td>
<tr>
<tr>
<td> VMWare Faults </td>
<td> VMWare Experiments </td>
<td> VMWare Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/vmware"> VMWare Faults </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/vmware"> VMWare Experiments </a></td>
<tr>
</table>
## Installation Steps for Chart Releases
## Installation Steps for Chart Releases
*Note: Supported from release 3.0.0*
*Note: Supported from release 1.1.0*
- To install the chaos faults from a specific chart for a given release, execute the following commands
- To install the chaos experiments from a specific chart for a given release, execute the following commands
with the desired `<release_version>`, `<chart_name>` & `<namespace>`
```bash
## downloads and unzips the released source
tar -zxvf <(curl -sL https://github.com/litmuschaos/chaos-charts/archive/<release_version>.tar.gz)
## installs the chaosexperiment resources
## installs the chaosexperiment resources
find chaos-charts-<release_version> -name experiments.yaml | grep <chart-name> | xargs kubectl apply -n <namespace> -f
```
- For example, to install the *Kubernetes* fault chart bundle for release *3.0.0*, in the *sock-shop* namespace, run:
```
- For example, to install the *generic* experiment chart bundle for release *1.1.0*, in the *sock-shop* namespace, run:
```bash
tar -zxvf <(curl -sL https://github.com/litmuschaos/chaos-charts/archive/3.0.0.tar.gz)
find chaos-charts-3.0.0 -name experiments.yaml | grep kubernetes | xargs kubectl apply -n sock-shop -f
tar -zxvf <(curl -sL https://github.com/litmuschaos/chaos-charts/archive/1.1.0.tar.gz)
find chaos-charts-1.1.0 -name experiments.yaml | grep generic | xargs kubectl apply -n sock-shop -f
```
- If you would like to install a specific fault, replace the `experiments.yaml` in the above command with the relative path of the fault manifest within the parent chart. For example, to install only the *pod-delete* fault, run:
- If you would like to install a specific experiment, replace the `experiments.yaml` in the above command with the relative
path of the experiment manifest within the parent chart. For example, to install only the *pod-delete* experiment, run:
```bash
find chaos-charts-3.0.0 -name fault.yaml | grep 'kubernetes/pod-delete' | xargs kubectl apply -n sock-shop -f
find chaos-charts-1.1.0 -name experiment.yaml | grep 'generic/pod-delete' | xargs kubectl apply -n sock-shop -f
```

View File

@ -0,0 +1,10 @@
# Remote namespace
# This experiment help you to kill a micro service running on the k8 cluster
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine-kiam.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac -`kubectl delete -f rbac.yaml`

View File

@ -0,0 +1,35 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-service-kill-health
namespace: default
spec:
appinfo:
appns: 'default'
applabel: 'app=nginx'
appkind: 'deployment'
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-service-kill
spec:
components:
env:
# set chaos namespace
- name: NAME_SPACE
value: 'default'
# set chaos label name
- name: LABEL_NAME
value: 'nginx'
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'service-app-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,80 @@
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-service-kill
labels:
name: k8-service-kill
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"
labels:
name: k8-service-kill
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'service-app-kill-health.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,36 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-service-kill
version: 0.0.4
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-service-kill
categoryDescription: |
K8 service kill contains chaos to kill a micro service running on the k8 cluster. It uses chaostoolkit to inject micro service kill against specified applications
keywords:
- Kubernetes
- State
platforms:
- Minikube
maturity: alpha
maintainers:
- name: sumit
email: sumit_nagal@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
labels:
app.kubernetes.io/component: chartserviceversion
app.kubernetes.io/version: latest
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/generic/k8-service-kill/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,20 @@
# Pre-requisite
_In Namespace Changes_
- This experiment assume that you are using AWS with kubernetes
- This experiment assume your namespace has right role for aws to make aws api calls
- This experiment also assume you are using Instance group for your name space or aware that if you are using share node group, it will impact other pods running on this ec2 instance
# Procedure
- Apply experiments for k8 - `kubectl apply -f experiments.yaml`
- Validate the experiments for k8 - `kubectl get chaosexperiment`
- Setup RBAC - for pod delete RBAC - `kubectl apply -f rbac.yaml`
- Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
- Validate experiment - `kubectl get pods -o wide`
- Validate logs - `kubectl logs -f <delete pod>`
- Clean up chaosexperiment -`kubectl delete -f engine.yaml`
- Clean up rbac -`kubectl delete -f rbac.yaml`

View File

@ -0,0 +1,49 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-aws-ec2-terminate
namespace: default
spec:
appinfo:
appns: 'default'
applabel: 'app=nginx'
appkind: 'deployment'
engineState: 'active'
chaosServiceAccount: chaos-admin
components:
runner:
runnerannotation:
iam.amazonaws.com/role: "k8s-chaosec2access"
experiments:
- name: k8-aws-ec2-terminate
spec:
components:
experimentannotation:
iam.amazonaws.com/role: "k8s-chaosec2access"
env:
- name: NAME_SPACE
value: default
- name: LABEL_NAME
value: app=nginx
- name: APP_ENDPOINT
value: localhost
- name: FILE
value: 'ec2-delete.json'
- name: AWS_ROLE
value: 'chaosec2access'
- name: AWS_ACCOUNT
value: '0000000000'
- name: AWS_REGION
value: 'us-west-2'
- name: AWS_AZ
value: 'us-west-2c'
- name: AWS_RESOURCE
value: 'ec2-iks'
- name: AWS_SSL
value: 'false'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,112 @@
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/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/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

View File

@ -0,0 +1,38 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-aws-ec2-terminate
version: 0.0.1
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-aws-ec2-terminate
categoryDescription: |
AWS EC2 terminate contains chaos to disrupt state of aws resources running part of kuberntes cluster workload. It uses chaostoolkit to inject ec2 instance termination against a specified applications
keywords:
- Kubernetes
- AWS
- EC2
- State
platforms:
- Minikube
maturity: alpha
maintainers:
- name: sumit
email: sumit_nagal@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
labels:
app.kubernetes.io/component: chartserviceversion
app.kubernetes.io/version: latest
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-aws/k8-aws-ec2-terminate/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-aws-ec2-terminate-sa
labels:
name: k8-aws-ec2-terminate-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: k8-aws-ec2-terminate-sa
labels:
name: k8-aws-ec2-terminate-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch","extensions","litmuschaos.io","openebs.io","storage.k8s.io"]
resources: ["chaosengines","chaosexperiments","chaosresults","configmaps","cstorpools","cstorvolumereplicas","events","jobs","persistentvolumeclaims","persistentvolumes","pods","pods/exec","pods/log","secrets","storageclasses","chaosengines","chaosexperiments","chaosresults","configmaps","cstorpools","cstorvolumereplicas","daemonsets","deployments","events","jobs","persistentvolumeclaims","persistentvolumes","pods","pods/eviction","pods/exec","pods/log","replicasets","secrets","services","statefulsets","storageclasses"]
verbs: ["create","delete","get","list","patch","update"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get","list","patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k8-aws-ec2-terminate-sa
labels:
name: k8-aws-ec2-terminate-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: k8-aws-ec2-terminate-sa
subjects:
- kind: ServiceAccount
name: k8-aws-ec2-terminate-sa
namespace: default

View File

@ -0,0 +1,60 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'
---

View File

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 959 B

View File

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 959 B

View File

Before

Width:  |  Height:  |  Size: 959 B

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,10 @@
# Remote namespace
* navigate to current directory `charts/generic/k8-alb-ingress-controller/`
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-alb-ingress-controller
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "app=alb-ingress-controller"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace
- name: NAME_SPACE
value: addon-alb-ingress-controller-ns
# set chaos label name
- name: LABEL_NAME
value: app=alb-ingress-controller
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-alb-ingress-controller
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-alb-ingress-controller
categoryDescription: |
k8-alb-ingress-controller contains chaos to disrupt state of ingress controller. It uses chaostoolkit to inject random pod delete failures against ingress controller
keywords:
- Kubernetes
- State
- Ingress
platforms:
- Minikube
maturity: alpha
maintainers:
- name: Navin
email: navin_kumarj@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-alb-ingress-controller/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,9 @@
# Remote namespace
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-calico-node
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "k8s-app=calico-node"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace
- name: NAME_SPACE
value: kube-system
# set chaos label name
- name: LABEL_NAME
value: k8s-app=calico-node
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-calico-node
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-calico-node
categoryDescription: |
k8-calico-node contains chaos to disrupt state of calico pod. It uses chaostoolkit to inject random pod delete failures against calico node pod.
keywords:
- Kubernetes
- State
- Calico
platforms:
- Minikube
maturity: alpha
maintainers:
- name: sumit
email: sumit_nagal@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-calico-node/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,36 @@
# chaosengine.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-kiam-count
namespace: default
spec:
#ex. values: ns1:name=percona,ns2:run=nginx
appinfo:
appns: kube-system
# FYI, To see app label, apply kubectl get pods --show-labels
#applabel: "app=nginx"
applabel: "app=kiam"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
- name: NAME_SPACE
value: kube-system
- name: LABEL_NAME
value: kiam
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-app-kill-count.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,36 @@
# chaosengine.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-kiam-custom-count
namespace: default
spec:
#ex. values: ns1:name=percona,ns2:run=nginx
appinfo:
appns: kube-system
# FYI, To see app label, apply kubectl get pods --show-labels
#applabel: "app=nginx"
applabel: "app=kiam"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
- name: NAME_SPACE
value: kube-system
- name: LABEL_NAME
value: app=kiam
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-count.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,36 @@
# chaosengine.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-kiam-custom-health
namespace: default
spec:
#ex. values: ns1:name=percona,ns2:run=nginx
appinfo:
appns: kube-system
# FYI, To see app label, apply kubectl get pods --show-labels
#applabel: "app=nginx"
applabel: "app=kiam"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
- name: NAME_SPACE
value: kube-system
- name: LABEL_NAME
value: app=kiam
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,36 @@
# chaosengine.yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-kiam-health
namespace: default
spec:
#ex. values: ns1:name=percona,ns2:run=nginx
appinfo:
appns: kube-system
# FYI, To see app label, apply kubectl get pods --show-labels
#applabel: "app=nginx"
applabel: "app=kiam"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
- name: NAME_SPACE
value: kube-system
- name: LABEL_NAME
value: kiam
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-app-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,9 @@
# Remote namespace
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,37 @@
# Generic Chaos engine for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-calico-node
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "app=kiam"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace
- name: NAME_SPACE
value: kube-system
# set chaos label name
- name: LABEL_NAME
value: kiam
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-app-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-kiam
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-kiam
categoryDescription: |
k8-kiam contains chaos to disrupt state of kiam. It uses chaostoolkit to inject random pod delete failures against kiam pod.
keywords:
- Kubernetes
- State
- Kiam
platforms:
- Minikube
maturity: alpha
maintainers:
- name: sumit
email: sumit_nagal@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-kiam/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,10 @@
# Remote namespace
* navigate to current directory `charts/generic/k8-kube-proxy/`
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-kube-proxy
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "k8s-app=kube-proxy"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace
- name: NAME_SPACE
value: kube-system
# set chaos label name
- name: LABEL_NAME
value: k8s-app=kube-proxy
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-kube-proxy
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-kube-proxy
categoryDescription: |
k8-kube-proxy contains chaos to disrupt state of kube-proxy. It uses chaostoolkit to inject random pod delete failures against kube-proxy.
keywords:
- Kubernetes
- State
- Kube-proxy
platforms:
- Minikube
maturity: alpha
maintainers:
- name: Navin
email: navin_kumarj@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-kube-proxy/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,10 @@
# Remote namespace
* navigate to current directory `charts/generic/k8-prometheus-k8s-prometheus/`
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-prometheus-k8s-prometheus
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "app=prometheus"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace, we assume you are using the addon-metricset-ns if not modify the below namespace
- name: NAME_SPACE
value: addon-metricset-ns
# set chaos label name
- name: LABEL_NAME
value: prometheus
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-app-kill-health.json'
- name: REPORT
value: 'false'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-prometheus-k8s-prometheus
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-prometheus-k8s-prometheus
categoryDescription: |
k8-prometheus-k8s-prometheus contains chaos to disrupt state of prometheus. It uses chaostoolkit to inject random pod delete failures against prometheus application.
keywords:
- Kubernetes
- State
- Prometheus
platforms:
- Minikube
maturity: alpha
maintainers:
- name: Anushya
email: anushya_dharmarajan@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-prometheus-k8s-prometheus/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,10 @@
# Remote namespace
* navigate to current directory `charts/generic/k8-prometheus-operator/`
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-prometheus-operator
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "k8s-app=prometheus-operator"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace, we assume you are using the addon-metricset-ns if not modify the below namespace
- name: NAME_SPACE
value: addon-metricset-ns
# set chaos label name
- name: LABEL_NAME
value: k8s-app=prometheus-operator
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'false'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-prometheus-operator
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-prometheus-operator
categoryDescription: |
k8-prometheus-operator contains chaos to disrupt state of prometheus operator. It uses chaostoolkit to inject random pod delete failures against prometheus operator.
keywords:
- Kubernetes
- State
- Prometheus
platforms:
- Minikube
maturity: alpha
maintainers:
- name: Anushya
email: anushya_dharmarajan@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-prometheus-operator/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,10 @@
# Remote namespace
* navigate to current directory `charts/generic/k8-prometheus-pushgateway/`
* Apply experiments for K8 - `kubectl apply -f experiment.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-prometheus-pushgateway
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "k8s-app=prometheus-pushgateway"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace, we assume you are using the addon-metricset-ns if not modify the below namespace
- name: NAME_SPACE
value: addon-metricset-ns
# set chaos label name
- name: LABEL_NAME
value: k8s-app=prometheus-pushgateway
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'false'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-prometheus-pushgateway
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-prometheus-pushgateway
categoryDescription: |
k8-prometheus-pushgateway contains chaos to disrupt state of prometheus pushgateway. It uses chaostoolkit to inject random pod delete failures against prometheus pushgateway.
keywords:
- Kubernetes
- State
- Prometheus
platforms:
- Minikube
maturity: alpha
maintainers:
- name: Anushya
email: anushya_dharmarajan@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-prometheus-pushgateway/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,10 @@
# Remote namespace
# wavefront collector information - https://github.com/wavefrontHQ/wavefront-collector
* Apply experiments for K8 - `kubectl apply -f experiments.yaml`
* Validate the experiments for k8 - `kubectl get chaosexperiments`
* Setup RBAC as admin mode - `kubectl apply -f rbac-admin.yaml`
* Create pod Experiment - for health experiment -`kubectl create -f engine.yaml`
* Validate experiment - `kubectl get pods -w`
* Validate logs - `kubectl logs -f <delete pod>`
* Clean up chaosexperiment -`kubectl delete -f engine.yaml`
* Clean up rbac-admin -`kubectl delete -f rbac-admin.yaml`

View File

@ -0,0 +1,36 @@
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: k8-calico-node
namespace: default
spec:
appinfo:
appns: 'default'
applabel: "k8s-app=wavefront-collector"
appkind: deployment
engineState: 'active'
chaosServiceAccount: chaos-admin
experiments:
- name: k8-pod-delete
spec:
components:
env:
# set chaos namespace, we assume you are using the kube-system if not modify the below namespace
- name: NAME_SPACE
value: kube-system
# set chaos label name
- name: LABEL_NAME
value: k8s-app=wavefront-collector
# pod endpoint
- name: APP_ENDPOINT
value: 'localhost'
- name: FILE
value: 'pod-custom-kill-health.json'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,58 @@
# Generic Chaos experiment for Application team, who want to participate in Game Day
apiVersion: litmuschaos.io/v1alpha1
description:
message: |
Deletes a pod belonging to a deployment/statefulset/daemonset
kind: ChaosExperiment
metadata:
name: k8-pod-delete
spec:
definition:
scope: Namespaced
permissions:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
labels:
name: k8-pod-delete
app.kubernetes.io/part-of: litmus
image: "litmuschaos/py-runner:latest"
args:
- -c
- python /litmus/byoc/chaostest/chaostest/kubernetes/k8_wrapper.py ; exit 0
command:
- /bin/bash
env:
- name: CHAOSTOOLKIT_IN_POD
value: 'true'
- name: FILE
value: 'pod-app-kill-count.json'
- name: NAME_SPACE
value: ''
- name: LABEL_NAME
value: ''
- name: APP_ENDPOINT
value: ''
- name: PERCENTAGE
value: '50'
- name: REPORT
value: 'true'
- name: REPORT_ENDPOINT
value: 'none'
- name: TEST_NAMESPACE
value: 'default'

View File

@ -0,0 +1,34 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
name: k8-wavefront-collector
version: 0.1.0
annotations:
categories: Kubernetes
vendor: CNCF
createdAt: 2020-02-24T10:28:08Z
support: https://slack.kubernetes.io/
spec:
displayName: k8-wavefront-collector
categoryDescription: |
k8-wavefront-collector contains chaos to disrupt state of wavefront collector. It uses chaostoolkit to inject random pod delete failures against wavefront collector.
keywords:
- Kubernetes
- State
- Wavefront
platforms:
- Minikube
maturity: alpha
maintainers:
- name: sumit
email: sumit_nagal@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
links:
- name: Source Code
url: https://github.com/litmuschaos/litmus-python/tree/master/chaos-test
icon:
- url:
mediatype: ""
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/k8-wavefront-collector/experiment.yaml

View File

@ -0,0 +1,38 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-admin
labels:
name: chaos-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: chaos-admin
labels:
name: chaos-admin
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: chaos-admin
labels:
name: chaos-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: chaos-admin
subjects:
- kind: ServiceAccount
name: chaos-admin
namespace: default

View File

@ -0,0 +1,46 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: ["","apps","batch"]
resources: ["jobs","deployments","daemonsets"]
verbs: ["create","list","get","patch","delete"]
- apiGroups: ["","litmuschaos.io"]
resources: ["pods","configmaps","events","services","chaosengines","chaosexperiments","chaosresults","deployments","jobs"]
verbs: ["get","create","update","patch","delete","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs : ["get","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8-pod-delete-sa
namespace: default
labels:
name: k8-pod-delete-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: k8-pod-delete-sa
subjects:
- kind: ServiceAccount
name: k8-pod-delete-sa
namespace: default

View File

@ -0,0 +1,45 @@
apiVersion: litmuchaos.io/v1alpha1
kind: ChartServiceVersion
metadata:
createdAt: 2020-11-9T10:28:08Z
name: kube-components
version: 0.1.0
annotations:
categories: kube-components
chartDescription: Injects chaos on kube components. It uses chaostoolkit.
spec:
displayName: kube-components
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:
- k8-alb-ingress-controller
- k8-kiam
- k8-prometheus-operator
- k8-kube-proxy
- k8-prometheus-pushgateway
- k8-calico-node
- k8-prometheus-k8s-prometheus
- k8-wavefront-collector
keywords:
- Kubernetes
- Container
- Pod
- WaveFront
- Prometheus
maintainers:
- name: sumit
email: sumit_nagal@intuit.com
minKubeVersion: 1.12.0
provider:
name: Intuit
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/
icon:
- url: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/icons/kube-components.png
mediatype: image/png
chaosexpcrdlink: https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/byoc/kube-components/experiments.yaml

View File

@ -0,0 +1,26 @@
packageName: kube-components
experiments:
- name: k8-kiam
CSV: k8-kiam.chartserviceversion.yaml
desc: "k8-kiam"
- name: k8-prometheus-operator
CSV: k8-prometheus-operator.chartserviceversion.yaml
desc: "k8-prometheus-operator"
- name: k8-alb-ingress-controller
CSV: k8-alb-ingress-controller.chartserviceversion.yaml
desc: "k8-alb-ingress-controller"
- name: k8-kube-proxy
CSV: k8-kube-proxy.chartserviceversion.yaml
desc: "k8-kube-proxy"
- name: k8-prometheus-pushgateway
CSV: k8-prometheus-pushgateway.chartserviceversion.yaml
desc: "k8-prometheus-pushgateway"
- name: k8-calico-node
CSV: k8-calico-node.chartserviceversion.yaml
desc: "k8-calico-node"
- name: k8-prometheus-k8s-prometheus
CSV: k8-prometheus-k8s-prometheus.chartserviceversion.yaml
desc: "k8-prometheus-k8s-prometheus"
- name: k8-wavefront-collector
CSV: k8-wavefront-collector.chartserviceversion.yaml
desc: "k8-wavefront-collector"

View File

@ -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: 2.5.0
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

View 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'

View 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: 2.5.0
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:2.5.0"
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: 2.5.0
secrets:
- name: cloud-secret
mountPath: /tmp/

View 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

View File

@ -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: 2.5.0
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

View 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'

View 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: 2.5.0
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:2.5.0"
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: 2.5.0
secrets:
- name: cloud-secret
mountPath: /tmp/

View 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

View File

@ -0,0 +1,36 @@
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:
- aws-ssm-chaos-by-id
- aws-ssm-chaos-by-tag
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

View 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"

View File

@ -0,0 +1,266 @@
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: 2.5.0
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:2.5.0"
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: 2.5.0
secrets:
- name: cloud-secret
mountPath: /tmp/
---
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: 2.5.0
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:2.5.0"
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: 2.5.0
secrets:
- name: cloud-secret
mountPath: /tmp/
---

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -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: 2.5.0
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

View File

@ -1,12 +1,11 @@
---
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: azure-chaos
name: nginx-chaos
spec:
# It can be active/stop
engineState: 'active'
chaosServiceAccount: litmus-admin
chaosServiceAccount: azure-disk-loss-sa
experiments:
- name: azure-disk-loss
spec:
@ -19,15 +18,15 @@ spec:
# 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: ''
value: ''

View 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: 2.5.0
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:2.5.0"
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: 2.5.0
secrets:
- name: cloud-secret
mountPath: /tmp/

View 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

View File

@ -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: 2.5.0
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

View File

@ -1,4 +1,3 @@
---
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
@ -6,28 +5,29 @@ metadata:
namespace: default
spec:
engineState: 'active'
chaosServiceAccount: litmus-admin
chaosServiceAccount: azure-instance-stop-sa
experiments:
- name: azure-instance-stop
spec:
components:
env:
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'
value: '30'
# provide the target instance name(s) (comma separated if multiple)
- name: AZURE_INSTANCE_NAMES
- 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: ''

View 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: 2.5.0
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:2.5.0"
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: 2.5.0
secrets:
- name: cloud-secret
mountPath: /tmp/

Some files were not shown because too many files have changed in this diff Show More