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.

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
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
Optional tunables
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:
Chaos script contained BYOC_HELPER_IMAGE: The chaos script is included in theBYOC_HELPER_IMAGE.Chaos script mounted as volume: The script is not be included in theBYOC_HELPER_IMAGE. Instead, it is mounted as a volume inside the helper pod, andCOMMANDandARGSwill 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:
NodeSelector: Map of key-value pairs. For the helper pod to be executed on the nodes with the corresponding labels, theNodeSelectorfield 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?