Skip to content

Instantly share code, notes, and snippets.

@gtfisher
gtfisher / experiment.json
Last active June 3, 2020 10:55
Chaos Toolkit Experiment to monitor http endpoint and kill a pod with Chaos Mesh
{
"version": "1.0.0",
"title": "Website responds with success status, when the server pods has a failure.",
"description": "Check the Website continues to responds with success status when chaos mesh induces failure on the web server pod.",
"tags": [
"platform:Staging Cluster",
"service:Website",
"turbulence:chaosmesh"
],
"configuration": {
@gtfisher
gtfisher / nginx-pod-failure-example.yaml
Last active June 3, 2020 10:36
chaos mesh pod failure example
apiVersion: pingcap.com/v1alpha1
kind: PodChaos
metadata:
name: pod-failure-example
namespace: chaos-testing
spec:
action: pod-failure
mode: one
duration: "20s"
selector:
@gtfisher
gtfisher / chaosengine.yaml
Created May 21, 2020 14:07
litmusChaos Chaos engine yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: nginx-chaos
namespace: nginx
spec:
annotationCheck: 'true'
engineState: 'active'
appinfo:
appns: 'nginx'
@gtfisher
gtfisher / experiment.json
Created May 21, 2020 14:03
Chaos Toolkit Experiment using litmus chaos
{
"version": "1.0.0",
"title": "Website responds with success status, when the server container restarts ",
"description": "Check the Website continues to responds with success status when litmus chaos restarts a server container.",
"tags": [
"platform:Staging Cluster",
"service:Website",
"turbulence:litmuschaos"
],
"configuration": {
@gtfisher
gtfisher / Readme.md
Created May 21, 2020 13:58
Chaos Toolkit Experiment Catalog README for litmus chaos fault injection

This Experiment Checks a URL Responds with Success (200) Status when the Webserver Container is restarted with litmus-chaos

This experiment checks a URL responds with a success code when [litmuschaos][litmuschaos] is used to restart the container.

Setup for Experiment Execution

Install the Chaos Toolkit

This experiment uses the [free and open source Chaos Toolkit][chaostoolkit]. The instructions for installing the [Chaos Toolkit][chaostoolkit] are available in the [project's documentation][docs].

@gtfisher
gtfisher / long-running-scheduled-verification.yaml
Last active May 5, 2020 14:26
Long running verification with the Chaos Toolkit Kubernetes Operator
---
apiVersion: v1
kind: Namespace
metadata:
name: chaostoolkit-run
---
apiVersion: v1
kind: ConfigMap
metadata:
name: chaostoolkit-env
@gtfisher
gtfisher / basic-experiment.yaml
Last active May 5, 2020 14:31
Chaos Toolkit basic experiment for the Chaos Toolkit CRD
---
apiVersion: v1
kind: Namespace
metadata:
name: chaostoolkit-run
---
apiVersion: v1
kind: ConfigMap
metadata:
name: chaostoolkit-env
@gtfisher
gtfisher / aws-ssm-experiment.json
Created April 27, 2020 14:21
AWS SSM Chaos Toolkit Experiment
{
"version": "1.0.0",
"title": "Expect a quick response from a request to a server on an EC2 instance when the processor is loaded",
"description": "Expect a quick response when the processor is loaded with an AWS SSM command.",
"tags": ["response-time"],
"configuration": {
"endpoint_url": {
"type": "env",
"key": "ENDPOINT_URL"
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "my-service",
"labels": {
"service": "my-service"
}
},
"spec": {
@gtfisher
gtfisher / deployment.json
Created July 12, 2019 15:14
kubernetes deployment file
{
"apiVersion" : "apps/v1beta1",
"kind" : "Deployment",
"metadata" : {
"name" : "my-service"
},
"spec" : {
"replicas" : 3,
"selector" : {
"matchLabels" : {