Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix ChaosHub for Litmus 3.0 #612

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 53 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,213 +7,212 @@
[![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 experiments 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 faults are bundled into a Chaos Chart. Chaos Charts are classified into the following categories.

- [Generic Chaos](#generic-chaos)
- [Kubernetes Chaos](#kubernetes-chaos)
- [Application Chaos](#application-chaos)
- [Platform Chaos](#platform-chaos)

### Generic Chaos
### Kubernetes Chaos

Chaos actions that apply to generic Kubernetes resources are classified into this category. Following chaos experiments are supported under Generic Chaos Chart
Chaos faults that apply to Kubernetes resources are classified in this category. Following chaos faults are supported for Kubernetes:

<table>
<tr>
<th> Experiment Name </th>
<th> Fault 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/charts/generic/container-kill"> container-kill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/disk-fill"> disk-fill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/docker-service-kill"> docker-service-kill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/kubelet-service-kill"> kubelet-service-kill </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/node-cpu-hog"> node-cpu-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/node-drain"> node-drain </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/node-io-stress"> node-io-stress </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/node-memory-hog"> node-memory-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/node-restart"> node-restart </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/node-taint"> node-taint </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-autoscaler"> pod-autoscaler </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-cpu-hog"> pod-cpu-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-delete"> pod-delete </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-dns-spoof"> pod-dns-spoof </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-dns-error"> pod-dns-error </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-io-stress"> pod-io-stress </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-memory-hog"> pod-memory-hog </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-network-latency"> pod-network-latency </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-network-corruption"> pod-network-corruption </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-network-duplication"> pod-network-duplication </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-network-loss"> pod-network-loss </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/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/charts/generic/pod-network-partition"> pod-network-partition </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/kubernetes/pod-network-partition"> pod-network-partition </a></td>
<tr>
</table>

### Application Chaos

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.
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.


<table>
<tr>
<th> Experiment Name </th>
<th> Fault Category </th>
<th> Description </th>
<th> Link </th>
</tr>
<tr>
<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>
<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>
<tr>
</table>

### Platform Chaos

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)
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.)

Following Platform Chaos experiments are available on ChaosHub
Following chaos faults are classified in this category:

<table>
<tr>
<th> Experiment Name </th>
<th> Fault Category </th>
<th> Description </th>
<th> Link </th>
</tr>
<tr>
<td> AWS Experiments </td>
<td> AWS Faults </td>
<td> AWS Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/kube-aws"> AWS Experiments </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/aws"> AWS Faults </a></td>
<tr>
<tr>
<td> Azure Experiments </td>
<td> Azure Faults </td>
<td> Azure Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/azure"> Azure Experiments </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/azure"> Azure Faults </a></td>
<tr>
<tr>
<td> GCP Experiments </td>
<td> GCP Faults </td>
<td> GCP Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/gcp"> GCP Experiments </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/gcp"> GCP Faults </a></td>
<tr>
<tr>
<td> VMWare Experiments </td>
<td> VMWare Faults </td>
<td> VMWare Platform specific chaos </td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/charts/generic/vmware"> VMWare Experiments </a></td>
<td> <a href="https://github.com/litmuschaos/chaos-charts/tree/master/faults/vmware"> VMWare Faults </a></td>
<tr>
</table>


## Installation Steps for Chart Releases
## Installation Steps for Chart Releases

*Note: Supported from release 1.1.0*
*Note: Supported from release 3.0.0*

- To install the chaos experiments from a specific chart for a given release, execute the following commands
- To install the chaos faults 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 *generic* experiment chart bundle for release *1.1.0*, in the *sock-shop* namespace, run:
```
- For example, to install the *Kubernetes* fault chart bundle for release *3.0.0*, in the *sock-shop* namespace, run:

```bash
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
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
```

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

```bash
find chaos-charts-1.1.0 -name experiment.yaml | grep 'generic/pod-delete' | xargs kubectl apply -n sock-shop -f
find chaos-charts-3.0.0 -name fault.yaml | grep 'kubernetes/pod-delete' | xargs kubectl apply -n sock-shop -f
```


Expand Down
4 changes: 2 additions & 2 deletions experiments/bank-of-anthos/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-bank-of-anthos-resiliency-
name: argowf-chaos-bank-of-anthos-resiliency
namespace: litmus
labels:
subject: "{{workflow.parameters.appNamespace}}_bank-of-anthos"
Expand Down Expand Up @@ -41,7 +41,7 @@ spec:
image: litmuschaos/k8s:latest
command: [sh, -c]
args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=faults/kubernetes/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} ; sleep 30"

- name: pod-network-loss
Expand Down
4 changes: 2 additions & 2 deletions experiments/bank-of-anthos/experiment_cron.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: argowf-chaos-bank-of-anthos-resiliency-cron-wf-
name: argowf-chaos-bank-of-anthos-resiliency-cron-wf
namespace: litmus
labels:
subject: "{{workflow.parameters.appNamespace}}_bank-of-anthos"
Expand Down Expand Up @@ -45,7 +45,7 @@ spec:
image: litmuschaos/k8s:latest
command: [sh, -c]
args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=faults/kubernetes/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} ; sleep 30"

- name: pod-network-loss
Expand Down
Binary file added experiments/icons/namespaced-scope-chaos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added experiments/icons/node-cpu-hog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added experiments/icons/node-memory-hog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added experiments/icons/pod-cpu-hog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added experiments/icons/pod-delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added experiments/icons/pod-memory-hog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion experiments/namespaced-scope-chaos/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-hello-world-pod-delete-
name: argowf-chaos-hello-world-pod-delete
labels:
subject: "{{workflow.parameters.adminModeNamespace}}_hello-world"
spec:
Expand Down
2 changes: 1 addition & 1 deletion experiments/node-cpu-hog/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-node-cpu-hog-
name: argowf-chaos-node-cpu-hog
namespace: litmus
labels:
subject: "{{workflow.parameters.context}}"
Expand Down
2 changes: 1 addition & 1 deletion experiments/node-memory-hog/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-node-memory-hog-
name: argowf-chaos-node-memory-hog
namespace: litmus
labels:
subject: "{{workflow.parameters.context}}"
Expand Down
2 changes: 1 addition & 1 deletion experiments/pod-cpu-hog/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-pod-cpu-hog-
name: argowf-chaos-pod-cpu-hog
namespace: litmus
labels:
subject: "{{workflow.parameters.appNamespace}}_kube-proxy"
Expand Down
2 changes: 1 addition & 1 deletion experiments/pod-delete/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-pod-delete-
name: argowf-chaos-pod-delete
namespace: litmus
labels:
subject: "{{workflow.parameters.appNamespace}}_kube-proxy"
Expand Down
2 changes: 1 addition & 1 deletion experiments/pod-memory-hog/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-chaos-pod-memory-hog-
name: argowf-chaos-pod-memory-hog
namespace: litmus
labels:
subject: "{{workflow.parameters.appNamespace}}_kube-proxy"
Expand Down
4 changes: 2 additions & 2 deletions experiments/podtato-head/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: argowf-podtato-head-chaos-
name: argowf-podtato-head-chaos
namespace: litmus
labels:
subject : "{{workflow.parameters.adminModeNamespace}}_podtato-main"
Expand Down Expand Up @@ -39,7 +39,7 @@ spec:
image: litmuschaos/k8s:latest
command: [sh, -c]
args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=faults/kubernetes/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} ; sleep 30"

- name: pod-delete
Expand Down
2 changes: 1 addition & 1 deletion experiments/podtato-head/experiment_cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
image: litmuschaos/k8s:latest
command: [sh, -c]
args:
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/experiments.yaml -n
- "kubectl apply -f https://hub.litmuschaos.io/api/chaos/master?file=faults/kubernetes/experiments.yaml -n
{{workflow.parameters.adminModeNamespace}} ; sleep 30"

- name: pod-delete
Expand Down
Loading
Loading