+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is nginx |
+ /home/runner/.kube/config |
- | CHAOS_INTERVAL |
- Time interval b/w two successive container kill (in seconds) |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is 10s |
+ litmus |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-container-kill |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running container kill experiment keep it container-kill |
+ Mandatory |
+ No default value |
+
+
+ | TARGET_CONTAINER |
+ The name of container to be killed inside the pod |
Optional |
- Default value is not set to true |
+ nginx |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CHAOS_INTERVAL |
+ Time interval b/w two successive container kills (in seconds) |
+ Optional |
+ 10 |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
Optional |
- Default value is not set to true |
+ 20 |
| CONTAINER_RUNTIME |
Give the target container runtime |
Optional |
- Default value is 'docker' |
-
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
+ Optional |
+ /run/containerd/containerd.sock |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
+ Always |
+
+
+ | SIGNAL |
+ Signal to be sent to the container |
+ Optional |
+ SIGKILL |
+
+
+ | SEQUENCE |
+ Sequence of chaos execution |
+ Optional |
+ parallel |
+
+
+ | DEFAULT_HEALTH_CHECK |
+ Enable/disable default health checks |
+ Optional |
+ false |
+
+
+ | RAMP_TIME |
+ Time to wait before and after chaos injection (in seconds) |
+ Optional |
+ Not set |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/disk-fill/README.md b/experiments/disk-fill/README.md
index 9892ce1..2cacb49 100644
--- a/experiments/disk-fill/README.md
+++ b/experiments/disk-fill/README.md
@@ -19,35 +19,60 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running disk-fill chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: disk-fill
- FILL_PERCENTAGE: 80
- TARGET_CONTAINER: nginx
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running disk-fill chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "disk-fill-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "namespace"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: disk-fill
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Disk Fill Specific Configuration
+ FILL_PERCENTAGE: 80
+ TARGET_CONTAINER: nginx
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+ TOTAL_CHAOS_DURATION: 60
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for disk-fill will be identified with the app info variables.
+The following environment variables are used to configure the disk-fill experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is nginx |
-
+ /home/runner/.kube/config |
+
- | FILL_PERCENTAGE |
- Percentage to fill the Ephemeral storage limit |
+ APP_NS |
+ Application namespace for chaos testing |
+ Optional |
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-disk-fill |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running disk fill experiment keep it disk-fill |
+ Mandatory |
+ No default value |
+
+
+ | TARGET_CONTAINER |
+ Name of container which is subjected to disk-fill |
Optional |
- Default value is not set to true |
+ nginx |
+
+
+ | FILL_PERCENTAGE |
+ Percentage to fill the Ephemeral storage limit |
+ Optional |
+ 80 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
Optional |
- Default value is not set to true |
+ containerd |
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
+ Optional |
+ /run/containerd/containerd.sock |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 60 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/node-cpu-hog/README.md b/experiments/node-cpu-hog/README.md
index 0f8d550..16ad8b9 100644
--- a/experiments/node-cpu-hog/README.md
+++ b/experiments/node-cpu-hog/README.md
@@ -17,35 +17,59 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running node-cpu-hog chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: node-cpu-hog
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TOTAL_CHAOS_DURATION: 60
- NODE_CPU_CORE: 2
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running node-cpu-hog chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "node-cpu-hog-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "cluster"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: node-cpu-hog
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Node CPU Hog Specific Configuration
+ TOTAL_CHAOS_DURATION: 60
+ NODE_CPU_CORE: 2
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for node-cpu-hog will be identified with the app info variables.
+The following environment variables are used to configure the node-cpu-hog experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is 2 |
+ /home/runner/.kube/config |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is 60s |
-
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-node-cpu-hog |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running node cpu hog experiment keep it node-cpu-hog |
+ Mandatory |
+ No default value |
+
+
+ | NODE_CPU_CORE |
+ Number of cores of node CPU to be consumed |
Optional |
- Default value is not set to true |
+ 2 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
+ Optional |
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
Optional |
- Default value is not set to true |
+ /run/containerd/containerd.sock |
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 60 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/node-io-stress/README.md b/experiments/node-io-stress/README.md
index e840650..340d51b 100644
--- a/experiments/node-io-stress/README.md
+++ b/experiments/node-io-stress/README.md
@@ -1,7 +1,7 @@
# Node IO Stress Experiment
This experiment causes IO stress on the Kubernetes node. The experiment aims to verify the resiliency of applications that share this disk resource for ephemeral or persistent storage purposes.
-. Check
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is 10 |
+ /home/runner/.kube/config |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is 120s |
-
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-node-io-stress |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running node io stress experiment keep it node-io-stress |
+ Mandatory |
+ No default value |
+
+
+ | FILESYSTEM_UTILIZATION_PERCENTAGE |
+ The size as percent of total available filesystem space (in percentage) |
Optional |
- Default value is not set to true |
+ 10 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
+ Optional |
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
Optional |
- Default value is not set to true |
+ /run/containerd/containerd.sock |
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 120 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/node-memory-hog/README.md b/experiments/node-memory-hog/README.md
index b3209a3..385c0ba 100644
--- a/experiments/node-memory-hog/README.md
+++ b/experiments/node-memory-hog/README.md
@@ -19,32 +19,57 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Running node-memory-hog chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##if litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: node-memory-hog
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TOTAL_CHAOS_DURATION: 120
- MEMORY_PERCENTAGE: 90
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running node-memory-hog chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "node-memory-hog-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "cluster"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: node-memory-hog
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Node Memory Hog Specific Configuration
+ TOTAL_CHAOS_DURATION: 120
+ MEMORY_PERCENTAGE: 90
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for node-memory-hog will be identified with the app info variables.
+The following environment variables are used to configure the node-memory-hog experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is 90 |
+ /home/runner/.kube/config |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is 120s |
-
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-node-memory-hog |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running node memory hog experiment keep it node-memory-hog |
+ Mandatory |
+ No default value |
+
+
+ | MEMORY_PERCENTAGE |
+ The size as percent of total available memory |
Optional |
- Default value is not set to true |
+ 90 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
+ Optional |
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
Optional |
- Default value is not set to true |
+ /run/containerd/containerd.sock |
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 120 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-autoscaler/README.md b/experiments/pod-autoscaler/README.md
index 9483d6d..407e532 100644
--- a/experiments/pod-autoscaler/README.md
+++ b/experiments/pod-autoscaler/README.md
@@ -15,34 +15,60 @@ on:
branches: [ master ]
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod autoscaler chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-autoscaler
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TOTAL_CHAOS_DURATION: 60
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod autoscaler chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "pod-autoscaler-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "namespace"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-autoscaler
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Autoscaler Specific Configuration
+ TOTAL_CHAOS_DURATION: 60
+ CHAOS_INTERVAL: 5
+ REPLICAS: 2
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for pod-autoscaler will be identified with the app info variables.
+The following environment variables are used to configure the pod-autoscaler experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is 5s |
+ /home/runner/.kube/config |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Defaults to 15s, NOTE: Overall run duration of the experiment may exceed the TOTAL_CHAOS_DURATION by a few min |
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-autoscaler |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running pod autoscaler experiment keep it pod-autoscaler |
+ Mandatory |
+ No default value |
+
+
+ | CHAOS_INTERVAL |
+ Time interval b/w two successive pod failures (in sec) |
Optional |
- Default value is not set to true |
+ 5 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | REPLICAS |
+ Number of replicas to scale |
Optional |
- Default value is not set to true |
+ 2 |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
+ Optional |
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
+ Optional |
+ /run/containerd/containerd.sock |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 60 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-cpu-hog/README.md b/experiments/pod-cpu-hog/README.md
index 3386567..6c48f70 100644
--- a/experiments/pod-cpu-hog/README.md
+++ b/experiments/pod-cpu-hog/README.md
@@ -17,36 +17,59 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod-cpu-hog chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-cpu-hog
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TARGET_CONTAINER: nginx
- TOTAL_CHAOS_DURATION: 60
- CPU_CORES: 1
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod-cpu-hog chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "pod-cpu-hog-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "namespace"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-cpu-hog
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod CPU Hog Specific Configuration
+ TARGET_CONTAINER: nginx
+ TOTAL_CHAOS_DURATION: 60
+ CPU_CORES: 1
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for pod-cpu-hog will be identified with the app info variables.
+The following environment variables are used to configure the pod-cpu-hog experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is nginx |
+ /home/runner/.kube/config |
- | CPU_CORES |
- Number of the cpu cores subjected to CPU stress |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is 1 |
+ litmus |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ ACTIVATE_INFRA |
+ Whether to activate infrastructure |
Optional |
- Default value is 60s |
-
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-cpu-hog |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running pod cpu hog experiment keep it pod-cpu-hog |
+ Mandatory |
+ No default value |
+
+
+ | TARGET_CONTAINER |
+ Name of the container subjected to CPU stress |
Optional |
- Default value is not set to true |
+ nginx |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CPU_CORES |
+ Number of the cpu cores subjected to CPU stress |
+ Optional |
+ 1 |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
Optional |
- Default value is not set to true |
+ 60 |
| EXPERIMENT_IMAGE |
- We can provide custom image for running litmus chaos experiment |
+ We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-delete/README.md b/experiments/pod-delete/README.md
index 22f583e..45aed64 100644
--- a/experiments/pod-delete/README.md
+++ b/experiments/pod-delete/README.md
@@ -17,36 +17,59 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod delete chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-delete
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TOTAL_CHAOS_DURATION: 30
- CHAOS_INTERVAL: 10
- FORCE: false
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod delete chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "pod-delete-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "namespace"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-delete
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Delete Specific Configuration
+ TOTAL_CHAOS_DURATION: 30
+ CHAOS_INTERVAL: 10
+ FORCE: false
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for pod-delete will be identified with the app info variables.
+The following environment variables are used to configure the pod-delete experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is nginx |
+ /home/runner/.kube/config |
- | CHAOS_INTERVAL |
- Time interval b/w two successive pod failures (in sec) |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is 5s |
+ litmus |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ ACTIVATE_INFRA |
+ Whether to activate infrastructure |
Optional |
- Defaults to 15s, NOTE: Overall run duration of the experiment may exceed the TOTAL_CHAOS_DURATION by a few min |
+ true |
-
- | FORCE |
- Application Pod failures type |
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-delete |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running pod delete experiment keep it pod-delete |
+ Mandatory |
+ No default value |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
Optional |
- Default value is not set to true |
+ 15 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | CHAOS_INTERVAL |
+ Time interval b/w two successive pod failures (in sec) |
Optional |
- Default value is not set to true |
+ 5 |
+
+
+ | FORCE |
+ Application Pod failures type |
+ Optional |
+ false |
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-memory-hog/README.md b/experiments/pod-memory-hog/README.md
index 028ae08..3ce4e8e 100644
--- a/experiments/pod-memory-hog/README.md
+++ b/experiments/pod-memory-hog/README.md
@@ -17,36 +17,59 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod-memory-hog chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-cpu-hog
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TARGET_CONTAINER: nginx
- TOTAL_CHAOS_DURATION: 60
- MEMORY_CONSUMPTION: 500
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod-memory-hog chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "pod-memory-hog-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "namespace"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-memory-hog
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Memory Hog Specific Configuration
+ TARGET_CONTAINER: nginx
+ TOTAL_CHAOS_DURATION: 60
+ MEMORY_CONSUMPTION: 500
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for pod-cpu-hog will be identified with the app info variables.
+The following environment variables are used to configure the pod-memory-hog experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is 500M |
+ /home/runner/.kube/config |
- | TARGET_CONTAINER |
- Name of the container subjected to CPU stress. |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is nginx |
+ litmus |
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ ACTIVATE_INFRA |
+ Whether to activate infrastructure |
Optional |
- Default value is 120s |
-
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-memory-hog |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running pod memory hog experiment keep it pod-memory-hog |
+ Mandatory |
+ No default value |
+
+
+ | MEMORY_CONSUMPTION |
+ The amount of memory used of hogging a Kubernetes pod |
Optional |
- Default value is not set to true |
+ 500M |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | TARGET_CONTAINER |
+ Name of the container subjected to memory stress |
+ Optional |
+ nginx |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
Optional |
- Default value is not set to true |
+ 120 |
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-network-corruption/README.md b/experiments/pod-network-corruption/README.md
index 250e9d7..049504d 100644
--- a/experiments/pod-network-corruption/README.md
+++ b/experiments/pod-network-corruption/README.md
@@ -17,37 +17,70 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod network corruption chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-network-corruption
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TARGET_CONTAINER: nginx
- TOTAL_CHAOS_DURATION: 60
- NETWORK_INTERFACE: eth0
- CONTAINER_RUNTIME: docker
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod network corruption chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Common Environment Variables
+ KUBECONFIG: /home/runner/.kube/config
+ APP_NS: litmus
+ ACTIVATE_INFRA: true
+ CREATE_ENV: true
+ ENV_NAME: ci-test-env
+ ENV_TYPE: NON_PROD
+ INFRA_ACTIVATION_TIMEOUT: 5
+ LITMUS_USE_EXISTING_PROBE: false
+ APP_LABEL: app=nginx-pod-network-corruption
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: pod-network-corruption-infra
+ INFRA_NAMESPACE: litmus
+ INFRA_SCOPE: namespace
+
+ # Application Info
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-network-corruption
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Network Corruption Specific Configuration
+ TARGET_CONTAINER: nginx
+ TOTAL_CHAOS_DURATION: 60
+ NETWORK_INTERFACE: eth0
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for pod-network-corruption will be identified with the app info variables.
+The following environment variables are used to configure the pod-network-corruption experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is eth0 |
+ /home/runner/.kube/config |
- | TARGET_CONTAINER |
- Name of container which is subjected to network corruption. |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is nginx |
+ litmus |
- | CONTAINER_RUNTIME |
- Give the target container runtime |
+ ACTIVATE_INFRA |
+ Whether to activate infrastructure |
Optional |
- Default value is 'docker' |
-
+ true |
+
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ CREATE_ENV |
+ Whether to create environment |
Optional |
- Default value is 120s |
-
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-network-corruption |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running pod network corruption experiment keep it pod-network-corruption |
+ Mandatory |
+ No default value |
+
+
+ | NETWORK_INTERFACE |
+ Name of ethernet interface considered for shaping traffic |
Optional |
- Default value is not set to true |
+ eth0 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | TARGET_CONTAINER |
+ Name of container which is subjected to network corruption |
Optional |
- Default value is not set to true |
+ nginx |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
+ Optional |
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
+ Optional |
+ /run/containerd/containerd.sock |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 120 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-network-duplication/README.md b/experiments/pod-network-duplication/README.md
index c3006d0..8f6d3d9 100644
--- a/experiments/pod-network-duplication/README.md
+++ b/experiments/pod-network-duplication/README.md
@@ -15,37 +15,61 @@ on:
branches: [ master ]
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod network duplication chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-network-duplication
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TARGET_CONTAINER: nginx
- TOTAL_CHAOS_DURATION: 60
- NETWORK_INTERFACE: eth0
- CONTAINER_RUNTIME: docker
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod network duplication chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: "pod-network-duplication-infra"
+ INFRA_NAMESPACE: "litmus"
+ INFRA_SCOPE: "namespace"
+
+ # Application Info
+ APP_NS: default
+ APP_LABEL: run=nginx
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-network-duplication
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Network Duplication Specific Configuration
+ TARGET_CONTAINER: nginx
+ TOTAL_CHAOS_DURATION: 60
+ NETWORK_INTERFACE: eth0
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
-The application pod for pod-network-duplication will be identified with the app info variables.
+The following environment variables are used to configure the pod-network-duplication experiment.
-**Supported Chaos Action Tunables**
+### SDK Authentication Variables (Required)
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
Optional |
- Default value is eth0 |
+ /home/runner/.kube/config |
- | TARGET_CONTAINER |
- Name of container which is subjected to network duplication. |
+ APP_NS |
+ Application namespace for chaos testing |
Optional |
- Default value is nginx |
+ litmus |
- | CONTAINER_RUNTIME |
- Give the target container runtime |
+ ACTIVATE_INFRA |
+ Whether to activate infrastructure |
Optional |
- Default value is 'docker' |
-
+ true |
+
- | TOTAL_CHAOS_DURATION |
- The time duration for chaos injection (seconds) |
+ CREATE_ENV |
+ Whether to create environment |
Optional |
- Default value is 120s |
-
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-network-duplication |
+
+
+
+### Infrastructure Setup Variables
+
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | EXPERIMENT_NAME |
+ For Running pod network duplication experiment keep it pod-network-duplication |
+ Mandatory |
+ No default value |
+
+
+ | NETWORK_INTERFACE |
+ Name of ethernet interface considered for shaping traffic |
Optional |
- Default value is not set to true |
+ eth0 |
-
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+
+ | TARGET_CONTAINER |
+ Name of container which is subjected to network duplication |
Optional |
- Default value is not set to true |
+ nginx |
+
+ | CONTAINER_RUNTIME |
+ Give the target container runtime |
+ Optional |
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
+ Optional |
+ /run/containerd/containerd.sock |
+
+
+ | TOTAL_CHAOS_DURATION |
+ The time duration for chaos injection (seconds) |
+ Optional |
+ 120 |
+
| EXPERIMENT_IMAGE |
We can provide custom image for running chaos experiment |
Optional |
- Default value is litmuschaos/go-runner |
+ litmuschaos/go-runner |
| EXPERIMENT_IMAGE_TAG |
We can set the image tag while using custom image for the chaos experiment |
Optional |
- Default value is latest |
+ 3.18.0 |
- | IMAGE_PULL_POLICY |
+ IMAGE_PULL_POLICY |
We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is Always |
-
+ Always |
+
+
+ | PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
+ Optional |
+ 0 (All pods) |
+
+
+ | TARGET_PODS |
+ Comma-separated list of specific pods to target |
+ Optional |
+ Not set |
+
+
+ | INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
+ Optional |
+ Not set to true |
+
+
+ | LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
+ Optional |
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-network-latency/README.md b/experiments/pod-network-latency/README.md
index 17bd061..c7052dd 100644
--- a/experiments/pod-network-latency/README.md
+++ b/experiments/pod-network-latency/README.md
@@ -17,38 +17,306 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod-network-latency chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- #If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-network-latency
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TARGET_CONTAINER: nginx
- TOTAL_CHAOS_DURATION: 60
- NETWORK_INTERFACE: eth0
- NETWORK_LATENCY: 60000
- CONTAINER_RUNTIME: docker
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod-network-latency chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Common Environment Variables
+ KUBECONFIG: /home/runner/.kube/config
+ APP_NS: litmus
+ ACTIVATE_INFRA: true
+ CREATE_ENV: true
+ ENV_NAME: ci-test-env
+ ENV_TYPE: NON_PROD
+ INFRA_ACTIVATION_TIMEOUT: 5
+ LITMUS_USE_EXISTING_PROBE: false
+ APP_LABEL: app=nginx-pod-network-latency
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: pod-network-latency-infra
+ INFRA_NAMESPACE: litmus
+ INFRA_SCOPE: namespace
+
+ # Application Info
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-network-latency
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Network Latency Specific Configuration
+ TARGET_CONTAINER: nginx
+ TOTAL_CHAOS_DURATION: 60
+ NETWORK_INTERFACE: eth0
+ NETWORK_LATENCY: 60000
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
+
+The following environment variables are used to configure the pod-network-latency experiment.
+
+### SDK Authentication Variables (Required)
+
+
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
+ Optional |
+ /home/runner/.kube/config |
+
+
+ | APP_NS |
+ Application namespace for chaos testing |
+ Optional |
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-network-latency |
+
+
+
+### Infrastructure Setup Variables
+
+
@@ -67,79 +335,88 @@ The application pod for pod-network-latency will be identified with the app info
| NETWORK_INTERFACE |
Name of ethernet interface considered for shaping traffic |
Optional |
- Default value is eth0 |
+ eth0 |
-
+
| NETWORK_LATENCY |
The latency/delay in milliseconds |
Optional |
- Default (60000ms) |
+ 60000 |
| CONTAINER_RUNTIME |
Give the target container runtime |
Optional |
- Default value is 'docker' |
-
+ containerd |
+
+
+ | SOCKET_PATH |
+ Socket path for the container runtime |
+ Optional |
+ /run/containerd/containerd.sock |
+
| TARGET_CONTAINER |
- Name of container which is subjected to network latency. |
+ Name of container which is subjected to network latency |
Optional |
- Default value is nginx |
+ nginx |
| TOTAL_CHAOS_DURATION |
The time duration for chaos injection (seconds) |
Optional |
- Default value is 120s |
-
-
- | APP_NS |
- Provide namespace of application under chaos |
- Optional |
- Default value is default |
-
+ 120 |
+
- | APP_LABEL |
- Provide application label of application under chaos. |
+ EXPERIMENT_IMAGE |
+ We can provide custom image for running chaos experiment |
Optional |
- Default value is run=nginx |
+ litmuschaos/go-runner |
- | APP_KIND |
- Provide the kind of application |
- Optional |
- Default value is deployment |
-
+ EXPERIMENT_IMAGE_TAG |
+ We can set the image tag while using custom image for the chaos experiment |
+ Optional |
+ 3.18.0 |
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ IMAGE_PULL_POLICY |
+ We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is not set to true |
+ Always |
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+ PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
Optional |
- Default value is not set to true |
+ 0 (All pods) |
-
- | EXPERIMENT_IMAGE |
- We can provide custom image for running chaos experiment |
+ TARGET_PODS |
+ Comma-separated list of specific pods to target |
Optional |
- Default value is litmuschaos/go-runner |
+ Not set |
- | EXPERIMENT_IMAGE_TAG |
- We can set the image tag while using custom image for the chaos experiment |
+ INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
Optional |
- Default value is latest |
-
+ Not set to true |
+
- | IMAGE_PULL_POLICY |
- We can set the image pull policy while using custom image for running chaos experiment |
+ LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
Optional |
- Default value is Always |
-
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true
diff --git a/experiments/pod-network-loss/README.md b/experiments/pod-network-loss/README.md
index c68b159..d2f5a39 100644
--- a/experiments/pod-network-loss/README.md
+++ b/experiments/pod-network-loss/README.md
@@ -17,38 +17,306 @@ on:
jobs:
build:
-
runs-on: ubuntu-latest
steps:
- - name: Running pod-network-loss chaos experiment
- uses: litmuschaos/github-chaos-actions@v0.4.0
- env:
- KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- ##If litmus is not installed
- INSTALL_LITMUS: true
- ##Give application info under chaos
- APP_NS: default
- APP_LABEL: run=nginx
- APP_KIND: deployment
- EXPERIMENT_NAME: pod-network-loss
- ##Custom images can also be used
- EXPERIMENT_IMAGE: litmuschaos/go-runner
- EXPERIMENT_IMAGE_TAG: latest
- IMAGE_PULL_POLICY: Always
- TARGET_CONTAINER: nginx
- TOTAL_CHAOS_DURATION: 60
- NETWORK_INTERFACE: eth0
- NETWORK_PACKET_LOSS_PERCENTAGE: 100
- CONTAINER_RUNTIME: docker
- ##Select true if you want to uninstall litmus after chaos
- LITMUS_CLEANUP: true
+ - name: Running pod-network-loss chaos experiment
+ uses: litmuschaos/github-chaos-actions@v0.4.0
+ env:
+ KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
+
+ # Litmus SDK Authentication
+ LITMUS_ENDPOINT: "https://chaos-center.example.com"
+ LITMUS_USERNAME: "admin"
+ LITMUS_PASSWORD: ${{ secrets.LITMUS_PASSWORD }}
+ LITMUS_PROJECT_ID: "your-project-id"
+
+ # Common Environment Variables
+ KUBECONFIG: /home/runner/.kube/config
+ APP_NS: litmus
+ ACTIVATE_INFRA: true
+ CREATE_ENV: true
+ ENV_NAME: ci-test-env
+ ENV_TYPE: NON_PROD
+ INFRA_ACTIVATION_TIMEOUT: 5
+ LITMUS_USE_EXISTING_PROBE: false
+ APP_LABEL: app=nginx-pod-network-loss
+
+ # Infrastructure Setup
+ INSTALL_INFRA: "true"
+ INFRA_NAME: pod-network-loss-infra
+ INFRA_NAMESPACE: litmus
+ INFRA_SCOPE: namespace
+
+ # Application Info
+ APP_KIND: deployment
+
+ # Experiment Configuration
+ EXPERIMENT_NAME: pod-network-loss
+ EXPERIMENT_IMAGE: litmuschaos/go-runner
+ EXPERIMENT_IMAGE_TAG: 3.18.0
+
+
+ # Pod Network Loss Specific Configuration
+ TARGET_CONTAINER: nginx
+ TOTAL_CHAOS_DURATION: 60
+ NETWORK_INTERFACE: eth0
+ NETWORK_PACKET_LOSS_PERCENTAGE: 100
+ CONTAINER_RUNTIME: containerd
+ SOCKET_PATH: /run/containerd/containerd.sock
+ PODS_AFFECTED_PERC: 0
+
+ # Optional Probe Setup
+ LITMUS_CREATE_PROBE: "true"
+ LITMUS_PROBE_NAME: "http-status-check"
+ LITMUS_PROBE_TYPE: "httpProbe"
+ LITMUS_PROBE_MODE: "SOT"
+ LITMUS_PROBE_URL: "http://nginx-svc:80/"
+ LITMUS_PROBE_RESPONSE_CODE: "200"
+
+ # Cleanup
+ LITMUS_CLEANUP: true
```
-## Environment Variabels
+## Environment Variables
+
+The following environment variables are used to configure the pod-network-loss experiment.
+
+### SDK Authentication Variables (Required)
+
+
+
+ | Variables |
+ Description |
+ Specify In Chaos Action |
+ Default Value |
+
+
+ | KUBECONFIG |
+ Path to kubeconfig file |
+ Optional |
+ /home/runner/.kube/config |
+
+
+ | APP_NS |
+ Application namespace for chaos testing |
+ Optional |
+ litmus |
+
+
+ | ACTIVATE_INFRA |
+ Whether to activate infrastructure |
+ Optional |
+ true |
+
+
+ | CREATE_ENV |
+ Whether to create environment |
+ Optional |
+ true |
+
+
+ | ENV_NAME |
+ Name of the environment |
+ Optional |
+ ci-test-env |
+
+
+ | ENV_TYPE |
+ Type of environment |
+ Optional |
+ NON_PROD |
+
+
+ | INFRA_ACTIVATION_TIMEOUT |
+ Timeout for infrastructure activation |
+ Optional |
+ 5 |
+
+
+ | LITMUS_USE_EXISTING_PROBE |
+ Whether to use existing probe |
+ Optional |
+ false |
+
+
+ | APP_LABEL |
+ Application label for targeting |
+ Optional |
+ app=nginx-pod-network-loss |
+
+
+
+### Infrastructure Setup Variables
+
+
@@ -67,78 +335,88 @@ The application pod for pod-network-loss will be identified with the app info va
| NETWORK_INTERFACE |
Name of ethernet interface considered for shaping traffic |
Optional |
- Default value is eth0 |
+ eth0 |
| NETWORK_PACKET_LOSS_PERCENTAGE |
- The packet loss in percentage. |
+ The packet loss in percentage |
Optional |
- Default value is 100 |
+ 100 |
| TARGET_CONTAINER |
- Name of container which is subjected to network loss. |
+ Name of container which is subjected to network loss |
Optional |
- Default value is nginx |
+ nginx |
| TOTAL_CHAOS_DURATION |
The time duration for chaos injection (seconds) |
Optional |
- Default value is 120s |
+ 120 |
| CONTAINER_RUNTIME |
Give the target container runtime |
Optional |
- Default value is 'docker' |
-
+ containerd |
+
- | APP_NS |
- Provide namespace of application under chaos |
+ SOCKET_PATH |
+ Socket path for the container runtime |
Optional |
- Default value is default |
+ /run/containerd/containerd.sock |
- | APP_LABEL |
- Provide application label of application under chaos. |
+ EXPERIMENT_IMAGE |
+ We can provide custom image for running chaos experiment |
Optional |
- Default value is run=nginx |
+ litmuschaos/go-runner |
- | APP_KIND |
- Provide the kind of application |
- Optional |
- Default value is deployment |
-
+ EXPERIMENT_IMAGE_TAG |
+ We can set the image tag while using custom image for the chaos experiment |
+ Optional |
+ 3.18.0 |
+
- | INSTALL_LITMUS |
- Keep it true to install litmus if litmus is not already installed. |
+ IMAGE_PULL_POLICY |
+ We can set the image pull policy while using custom image for running chaos experiment |
Optional |
- Default value is not set to true |
+ Always |
- | LITMUS_CLEANUP |
- Keep it true to uninstall litmus after chaos |
+ PODS_AFFECTED_PERC |
+ Percentage of pods affected by chaos |
Optional |
- Default value is not set to true |
+ 0 (All pods) |
- | EXPERIMENT_IMAGE |
- We can provide custom image for running chaos experiment |
+ TARGET_PODS |
+ Comma-separated list of specific pods to target |
Optional |
- Default value is litmuschaos/go-runner |
+ Not set |
- | EXPERIMENT_IMAGE_TAG |
- We can set the image tag while using custom image for the chaos experiment |
+ INSTALL_LITMUS |
+ Keep it true to install litmus if litmus is not already installed |
Optional |
- Default value is latest |
-
+ Not set to true |
+
- | IMAGE_PULL_POLICY |
- We can set the image pull policy while using custom image for running chaos experiment |
+ LITMUS_CLEANUP |
+ Keep it true to uninstall litmus after chaos |
Optional |
- Default value is Always |
-
+ Not set to true |
+
+
+## Experiment Execution Process
+
+The experiment execution has evolved to use a more sophisticated SDK-based approach with these steps:
+1. **Authentication & Setup**: Connect to Litmus Chaos Center using SDK credentials
+2. **Infrastructure Provisioning**: Create or use existing chaos infrastructure
+3. **Experiment Configuration**: Configure experiment parameters and probe settings
+4. **Execution & Monitoring**: Run the experiment with unique ID and monitor progress
+5. **Result Verification**: Verify results through detailed phase checking
+6. **Optional Cleanup**: Remove chaos infrastructure if LITMUS_CLEANUP is set to true