package
0.0.0-20250403091405-491dc5e31ac3
Repository: https://github.com/litmuschaos/litmus-go.git
Documentation: pkg.go.dev
# Functions
AbortWatcher continuously watch for the abort signals it will update chaosresult w/ failed step and create an abort event, if it received abort signal during chaos.
AbortWatcherWithoutExit continuously watch for the abort signals.
BuildSidecar builds the sidecar containers list.
CheckContainerStatus checks the status of the application container.
CheckForAvailabilityOfPod check the availability of the specified pod.
No description provided by the author
DeleteAllHelperPodBasedOnJobCleanupPolicy delete all the helper pods w/ matching label based on jobCleanupPolicy.
DeleteAllPod deletes all the pods with matching labels and wait until all the pods got terminated.
DeleteHelperPodBasedOnJobCleanupPolicy deletes specific helper pod based on jobCleanupPolicy.
DeletePod deletes the specified pod and wait until it got terminated.
FilterBasedOnPercentage return the slice of list based on the the provided percentage.
FilterNonChaosPods remove the chaos pods(operator, runner) for the podList it filter when the applabels are not defined and it will select random pods from appns.
No description provided by the author
No description provided by the author
GetContainerID derive the container id of the application container.
GetContainerNames gets the name of the main and sidecar containers.
GetExperimentPod fetch the experiment pod.
GetHelperLabels return the labels of the helper pod.
GetNodeList check for the availability of the application node for the chaos execution if the application node is not defined it will derive the random target node list using node affected percentage.
GetNodeName will select a random replica of application pod and return the node name of that application pod.
GetPauseAndSandboxPID extract out the PID of the target container.
No description provided by the author
GetPodList check for the availability of the target pod for the chaos execution if the target pod is not defined it will derive the random target pod list using pod affected percentage.
GetPodListFromSpecifiedNodes will filter out the pod list scheduled on specified node.
GetRandomSequence will gives a random value for sequence.
GetRuntimeBasedContainerID extract out the container id of the target container based on the container runtime.
GetServiceAccount derive the serviceAccountName for the helper pod.
GetSidecarVolumes get the list of all the unique volumes from the sidecar.
GetStatusMessage returns the event message.
No description provided by the author
GetTargetPodsWhenTargetPodsENVNotSet derives the random target pod list, if TARGET_PODS env is not set.
GetTargetPodsWhenTargetPodsENVSet derive the specific target pods, if TARGET_PODS env is set.
HelperFailedError return the helper pod error message.
No description provided by the author
RandomInterval wait for the random interval lies between lower & upper bounds.
No description provided by the author
No description provided by the author
SetHelperData derive the data from experiment pod and sets into experimentDetails struct which can be used to create helper pod.
SetParentName set the parent name in chaosdetails struct.
SetTargets set the target details in chaosdetails struct.
SubStringExistsInSlice checks the existence of sub string in slice.
ValidateRange validates the given range of numbers.
VerifyExistanceOfPods check the availibility of list of pods.
WaitForDuration waits for the given time duration (in seconds).
# Structs
CrictlInspectResponse JSON representation of crictl inspect command output in crio, pid is present inside pid attribute of inspect output in containerd, pid is present inside `info.pid` of inspect output.
DockerInspectResponse JSON representation of docker inspect command output.
ENVDetails contains the ENV details.
InfoDetails JSON representation of crictl inspect command output.
LinuxAttributes contains all the linux attributes.
Namespace contains linux namespace details.
RuntimeDetails contains runtime details.
StateDetails JSON representation of docker inspect command output.
No description provided by the author