For the complete documentation index, see llms.txt. This page is also available as Markdown.

Common pod fault tunables

Fault tunables which are common to all pod-level faults are listed here. These tunables can be provided at .spec.experiment[*].spec.components.env in the chaosengine.

Target specific pods

The TARGET_PODS environment variable targets the comma-separated name of the pods.

The following YAML snippet illustrates the use of this environment variable:

## it contains comma separated target pod names <a href="#it-contains-comma-separated-target-pod-names" id="it-contains-comma-separated-target-pod-names"></a>
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
  name: engine-nginx
spec:
  engineState: "active"
  annotationCheck: "false"
  appinfo:
    appns: "default"
    applabel: "app=nginx"
    appkind: "deployment"
  chaosServiceAccount: litmus-admin
  experiments:
  - name: pod-delete
    spec:
      components:
        env:
        ## comma separated target pod names
        - name: TARGET_PODS
          value: 'pod1,pod2'

Pod affected percentage

Percentage of target pods with matching the labels provided at .spec.appinfo.applabel inside the chaosengine. Tune it by using the PODS_AFFECTED_PERC environment variable. If PODS_AFFECTED_PERC is set to empty or 0, it targets a minimum of one pod.

The following YAML snippet illustrates the use of this environment variable:

Target specific container

Name of the target container. Tune it by using the TARGET_CONTAINER environment variable. If TARGET_CONTAINER is set to empty, it uses the first container of the target pod.

The following YAML snippet illustrates the use of this environment variable:

Default application health check

It specifies the default application status checks. It is helpful in cases where you do not wish to validate the application status as a mandatory check before and after chaos. Tune it by using the DEFAULT_APP_HEALTH_CHECK environment variable. If DEFAULT_APP_HEALTH_CHECK is not provided, it is set to true.

The following YAML snippet illustrates the use of this environment variable:

Node label filter to select the target pods

It specifies the target application pod selection from a specific node. It is helpful in cases where you do not wish to select the pods scheduled on specific nodes as chaos candidates considering the pod affected percentage. Tune it by using the NODE_LABEL environment variable.

This feature requires node-level permission or ClusterRole service account to filter pods on a specific node.

APP_LABEL
TARGET_PODS
NODE_LABEL
SELECTED PODS

Provided

Provided

Provided

The target pods that are filtered from applabel which reside on the node containing the given node label. It is specified using the TARGET_PODS environment variable.

Provided

Not Provided

Provided

The pods filtered from applabel that reside on the node containing the given node label is selected.

Not provided

Provided

Provided

The target pods that are selected reside on the node with given node label.

Not provided

Not provided

Provided

Invalid

Not provided

Not provided

Not provided

Invalid

The following YAML snippet illustrates the use of this environment variable:

Last updated

Was this helpful?