Project: Litmus (Observability and Analysis / Chaos Engineering)
File: runner-components.md

It contains all the chaos-runner tunables provided at `.spec.components.runner` inside chaosengine. ??? info "View the runner specification schema" <table> <tr> <th>Field</th> <td><code>.spec.components.runner.image</code></td> </tr> <tr> <th>Description</th> <td>Flag to specify image of ChaosRunner pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: string)</td> </tr> <tr> <th>Default</th> <td><i>n/a</i> (refer <i>Notes</i>)</td> </tr> <tr> <th>Notes</th> <td>The <code>.components.runner.image</code> allows developers to specify their own debug runner images. Defaults for the runner image can be enforced via the operator env <b>CHAOSRUNNERIMAGE</b></td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.imagePullPolicy</code></td> </tr> <tr> <th>Description</th> <td>Flag to specify imagePullPolicy for the ChaosRunner</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><code>Always</code>, <code>IfNotPresent</code></td> </tr> <tr> <th>Default</th> <td><code>IfNotPresent</code></td> </tr> <tr> <th>Notes</th> <td>The <code>.components.runner.imagePullPolicy</code> allows developers to specify the pull policy for chaos-runner. Set to <code>Always</code> during debug/test.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.imagePullSecrets</code></td> </tr> <tr> <th>Description</th> <td>Flag to specify imagePullSecrets for the ChaosRunner</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: []corev1.LocalObjectReference)</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.components.runner.imagePullSecrets</code> allows developers to specify the <code>imagePullSecret</code> name for ChaosRunner. </td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.runnerAnnotations</code></td> </tr> <tr> <th>Description</th> <td>Annotations that needs to be provided in the pod which will be created (runner-pod)</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td> <i>user-defined</i> (type: map[string]string) </td> </tr> <tr> <th>Default</th> <td> n/a </td> </tr> <tr> <th>Notes</th> <td>The <code>.components.runner.runnerAnnotation</code> allows developers to specify the custom annotations for the runner pod.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.args</code></td> </tr> <tr> <th>Description</th> <td>Specify the args for the ChaosRunner Pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: []string)</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.components.runner.args</code> allows developers to specify their own debug runner args.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.command</code></td> </tr> <tr> <th>Description</th> <td>Specify the commands for the ChaosRunner Pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: []string)</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.components.runner.command</code> allows developers to specify their own debug runner commands.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.configMaps</code></td> </tr> <tr> <th>Description</th> <td>Configmaps passed to the chaos runner pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: {name: string, mountPath: string})</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.spec.components.runner.configMaps</code> provides for a means to insert config information into the runner pod.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.secrets</code></td> </tr> <tr> <th>Description</th> <td>Kubernetes secrets passed to the chaos runner pod.</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: {name: string, mountPath: string})</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The

provides for a means to push secrets (typically project ids, access credentials etc.,) into the chaos runner pod. These are especially useful in case of platform-level/infra-level chaos experiments. </td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.nodeSelector</code></td> </tr> <tr> <th>Description</th> <td>Node selectors for the runner pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td>Labels in the from of label key=value</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.spec.components.runner.nodeSelector</code> The nodeselector contains labels of the node on which runner pod should be scheduled. Typically used in case of infra/node level chaos.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.resources</code></td> </tr> <tr> <th>Description</th> <td>Specify the resource requirements for the ChaosRunner pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: corev1.ResourceRequirements)</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.spec.components.runner.resources</code> contains the resource requirements for the ChaosRunner Pod, where we can provide resource requests and limits for the pod.</td> </tr> </table> <table> <tr> <th>Field</th> <td><code>.spec.components.runner.tolerations</code></td> </tr> <tr> <th>Description</th> <td>Toleration for the runner pod</td> </tr> <tr> <th>Type</th> <td>Optional</td> </tr> <tr> <th>Range</th> <td><i>user-defined</i> (type: []corev1.Toleration)</td> </tr> <tr> <th>Default</th> <td><i>n/a</i></td> </tr> <tr> <th>Notes</th> <td>The <code>.spec.components.runner.tolerations</code> Provides tolerations for the runner pod so that it can be scheduled on the respective tainted node. Typically used in case of infra/node level chaos.</td> </tr> </table> It allows developers to specify the custom annotations for the runner pod. It can be tuned via `runnerAnnotations` field. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: runnerAnnotations: name: chaos-runner appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` It defines the `args` and `command` to set the args and command of the chaos-runner respectively. `args`: It allows developers to specify their own debug runner args. `command`: It allows developers to specify their own debug runner commands. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: image: "<your repo>/chaos-runner:ci" args: "/bin/sh" command: "-c" "<custom-command>" appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` It defines the `configMaps` and `secrets` to set the configmaps and secrets mounted to the chaos-runner respectively. `configMaps`: It provides for a means to insert config information into the runner pod. `secrets`: It provides for a means to push secrets (typically project ids, access credentials, etc.,) into the chaos runner pod. These are especially useful in the case of platform-level/infra-level chaos

Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: configMaps: name: "configmap-01" mountPath: "/mnt" secrets: name: "secret-01" mountPath: "/tmp" appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` It defines the `image` and `imagePullPolicy` to set the image and imagePullPolicy for the chaos-runner respectively. `image`: It allows developers to specify their own debug runner images. Defaults for the runner image can be enforced via the operator env `CHAOSRUNNERIMAGE`. `imagePullPolicy`: It allows developers to specify the pull policy for chaos-runner. Set to Always during debug/test. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: image: "litmuschaos/chaos-runner:latest" imagePullPolicy: "Always" appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` It allows developers to specify the imagePullSecret name for the ChaosRunner. It can be tuned via `imagePullSecrets` field. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: imagePullSecrets: name: regcred appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` The nodeselector contains labels of the node on which runner pod should be scheduled. Typically used in case of infra/node level chaos. It can be tuned via `nodeSelector` field. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: nodeSelector: context: chaos appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` It contains the resource requirements for the ChaosRunner Pod, where we can provide resource requests and limits for the pod. It can be tuned via `resources` field. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: resources: requests: cpu: "250m" memory: "64Mi" limits: cpu: "500m" memory: "128Mi" appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ``` It provides tolerations for the runner pod so that it can be scheduled on the respective tainted node. Typically used in case of infra/node level chaos. It can be tuned via `tolerations` field. Use the following example to tune this: ```yaml apiVersion: litmuschaos.io/v1alpha1 kind: ChaosEngine metadata: name: engine-nginx spec: engineState: "active" annotationCheck: "false" components: runner: tolerations: key: "key1" operator: "Equal" value: "value1" effect: "Schedule" appinfo: appns: "default" applabel: "app=nginx" appkind: "deployment" chaosServiceAccount: pod-delete-sa experiments: name: pod-delete ```