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

BYOC Injector

BYOC (Bring Your Own Chaos) injector enables the execution of custom chaos faults using a special helper pod. The BYOC injector is designed to be flexible and easy to use, allowing users to define their own chaos experiments using a simple YAML specification.

BYOC Injector

Use cases

BYOC injector:

  • Validates the resilience of an application by introducing custom faults in critical service dependencies and observing the impact on overall system functionality.

  • Injects custom faults to simulate disaster scenarios, ensuring that the application's disaster recovery procedures are effective and efficient.

  • Implements custom faults to verify that the system meets compliance and regulatory requirements under adverse conditions, such as data corruption or service outages.

Prerequisites

  • Kubernetes > 1.16

Mandatory tunables

Tunable
Description
Notes

BYOC_HELPER_IMAGE

Image of the helper pod that contains the business logic for the custom fault.

For more information, go to byoc helper image

COMMAND

Command to execute in the helper pod.

For more information, go to command

ARGS

Arguments to execute in the helper pod.

For more information, go to args

Optional tunables

Tunable
Description
Notes

RAMP_TIME

Period to wait before and after injecting chaos (in seconds).

For example, 30s. For more information, go to ramp time.

Examples

BYOC injector supports two modes of execution:

  1. Chaos script contained BYOC_HELPER_IMAGE: The chaos script is included in the BYOC_HELPER_IMAGE.

  2. Chaos script mounted as volume: The script is not be included in the BYOC_HELPER_IMAGE. Instead, it is mounted as a volume inside the helper pod, and COMMAND and ARGS will be used to execute the script.

Chaos script in LIB_IMAGE

The LIB_IMAGE environment variable specifies the image of the helper pod that contains the business logic of the custom fault. Specify the COMMAND and ARGS for the helper pod to execute the custom fault.

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

Mounted chaos script

The script is not included in the BYOC_HELPER_IMAGE. Instead, it is mounted as a volume inside the helper pod, and COMMAND and ARGS will be used to execute the script.

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

Configure the advanced tunables

Configure the following advanced tunables for the BYOC injector:

Specify these tunables in the chaos engine.

  • NodeSelector: Map of key-value pairs. For the helper pod to be executed on the nodes with the corresponding labels, the NodeSelector field should be specified in the chaos engine.

  • Tolerations: Tolerations for the helper pod to be executed on the nodes with the corresponding taints.

  • HostPID: Whether the helper pod should share the PID namespace with the host.

  • ConfigMaps: ConfigMaps that need to be mounted as volumes in the helper pod.

  • Secrets: Secrets that need to be mounted as volumes in the helper pod.

  • HostFileVolumes: Host file volumes that need to be mounted as volumes in the helper pod.

  • SecurityContext: Security context for the helper pod.

The following YAML snippet illustrates the use of these advance tunables:

Last updated

Was this helpful?