Version: v0.0.0-...-3568c51 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0




View Source
const (
	// PreChaosCheck initial stage of experiment check for health before chaos injection
	PreChaosCheck string = "PreChaosCheck"
	// PostChaosCheck  pre-final stage of experiment check for health after chaos injection
	PostChaosCheck string = "PostChaosCheck"
	// Summary final stage of experiment update the verdict
	Summary string = "Summary"
	// ChaosInject this stage refer to the main chaos injection
	ChaosInject string = "ChaosInject"
	// AwaitedVerdict marked the start of test
	AwaitedVerdict string = "Awaited"
	// PassVerdict marked the verdict as passed in the end of experiment
	PassVerdict string = "Pass"
	// FailVerdict marked the verdict as failed in the end of experiment
	FailVerdict string = "Fail"
	// AbortVerdict marked the verdict as abort when experiment aborted
	AbortVerdict string = "Abort"


This section is empty.


func Getenv

func Getenv(key string, defaultValue string) string

Getenv fetch the env and set the default value, if any

func InitialiseChaosVariables

func InitialiseChaosVariables(chaosDetails *ChaosDetails)

InitialiseChaosVariables initialise all the global variables

func SetEngineEventAttributes

func SetEngineEventAttributes(eventsDetails *EventDetails, Reason, Message, Type string, chaosDetails *ChaosDetails)

SetEngineEventAttributes initialise attributes for event generation in chaos engine

func SetResultAfterCompletion

func SetResultAfterCompletion(resultDetails *ResultDetails, verdict v1alpha1.ResultVerdict, phase v1alpha1.ResultPhase, failStep string)

SetResultAfterCompletion set all the chaos result ENV in the EOT

func SetResultAttributes

func SetResultAttributes(resultDetails *ResultDetails, chaosDetails ChaosDetails)

SetResultAttributes initialise all the chaos result ENV

func SetResultEventAttributes

func SetResultEventAttributes(eventsDetails *EventDetails, Reason, Message, Type string, resultDetails *ResultDetails)

SetResultEventAttributes initialise attributes for event generation in chaos result


type AppDetails

type AppDetails struct {
	Namespace       string
	Label           string
	Kind            string
	AnnotationCheck bool
	AnnotationKey   string
	AnnotationValue string

AppDetails contains all the application related envs

type ChaosDetails

type ChaosDetails struct {
	ChaosUID              clientTypes.UID
	ChaosNamespace        string
	ChaosPodName          string
	EngineName            string
	InstanceID            string
	ExperimentName        string
	Timeout               int
	Delay                 int
	AppDetail             AppDetails
	ChaosDuration         int
	JobCleanupPolicy      string
	ProbeImagePullPolicy  string
	Randomness            bool
	Targets               []v1alpha1.TargetDetails
	ParentsResources      []string
	DefaultAppHealthCheck bool
	Annotations           map[string]string
	Resources             corev1.ResourceRequirements
	ImagePullSecrets      []corev1.LocalObjectReference
	Labels                map[string]string

ChaosDetails is for collecting all the global variables

type EventDetails

type EventDetails struct {
	Message      string
	Reason       string
	ResourceName string
	ResourceUID  clientTypes.UID
	Type         string

EventDetails is for collecting all the events-related details

type ProbeArtifact

type ProbeArtifact struct {
	ProbeArtifacts RegisterDetails

ProbeArtifact contains the probe artifacts

type ProbeDetails

type ProbeDetails struct {
	Name                   string
	Phase                  string
	Type                   string
	Status                 map[string]string
	IsProbeFailedWithError error
	RunID                  string
	RunCount               int

ProbeDetails is for collecting all the probe details

type RegisterDetails

type RegisterDetails struct {
	Register string

RegisterDetails contains the output of the corresponding probe

type ResultDetails

type ResultDetails struct {
	Name             string
	Verdict          v1alpha1.ResultVerdict
	FailStep         string
	Phase            v1alpha1.ResultPhase
	ResultUID        clientTypes.UID
	ProbeDetails     []ProbeDetails
	PassedProbeCount int
	ProbeArtifacts   map[string]ProbeArtifact

ResultDetails is for collecting all the chaos-result-related details

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL