This chaos action causes Disk Stress by filling up the Ephemeral Storage of the Pod using one of it containers. It forced the Pod to get Evicted if the Pod exceeds it Ephemeral Storage Limit.It tests the Ephemeral Storage Limits, to ensure those parameters are sufficient. Check disk fill docs for more info. To know more and get started with chaos-actions visit github-chaos-actions.
NOTE: Appropriate Ephemeral Storage Requests and Limits should be set for the application before running the chaos action.
A Sample workflow to run disk-fill experiment:
.github/workflows/main.yml
name: CI
on:
push:
branches: [ master ]
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
The application pod for disk-fill will be identified with the app info variables.
Supported Chaos Action Tunables
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 nginx |
FILL_PERCENTAGE | Percentage to fill the Ephemeral storage limit | Optional | Default value is 2 |
APP_NS | Provide namespace of application under chaos | Optional | Default value is default |
APP_LABEL | Provide application label of application under chaos. | Optional | Default value is run=nginx |
APP_KIND | Provide the kind of application | Optional | Default value is deployment |
INSTALL_LITMUS | Keep it true to install litmus if litmus is not already installed. | Optional | Default value is not set to true |
LITMUS_CLEANUP | Keep it true to uninstall litmus after chaos | Optional | Default value is not set to true |
EXPERIMENT_IMAGE | We can provide custom image for running chaos experiment | Optional | Default value is 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 |
IMAGE_PULL_POLICY | We can set the image pull policy while using custom image for running chaos experiment | Optional | Default value is Always |