pkg

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAfterMatch

func AddAfterMatch(filepath, key, newvalue string) error

AddAfterMatch will add a new line when a match is found

func ChaosEngineVerdict

func ChaosEngineVerdict(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

ChaosEngineVerdict checks the chaosengine verdict

func ChaosPodLogs

func ChaosPodLogs(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

ChaosPodLogs will print the experiment and helper pod logs

func ChaosPodStatus

func ChaosPodStatus(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

ChaosPodStatus will check the creation of chaos pod

func ChaosResultVerdict

func ChaosResultVerdict(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

ChaosResultVerdict checks the chaos result verdict

func CheckRunnerPodCreation

func CheckRunnerPodCreation(engineName, runnerNS string, clients environment.ClientSets) error

CheckRunnerPodCreation will check for the create of runner pod

func CreateChaosResource

func CreateChaosResource(fileData []byte, namespace string, clients environment.ClientSets) error

CreateChaosResource creates litmus components with given inputs

func DownloadFile

func DownloadFile(filepath string, url string) error

DownloadFile will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.

func EditFile

func EditFile(filepath, old, new string) error

EditFile will edit the content of a file

func EditKeyValue

func EditKeyValue(filepath, key, oldvalue, newvalue string) error

EditKeyValue will edit the value according to key content of the file

func GetUID

func GetUID(engineName, namespace string, clients environment.ClientSets) (string, error)

GetUID will return the uid from chaosengine

func InstallChaosEngine

func InstallChaosEngine(experimentsDetails *types.ExperimentDetails, chaosEngine *v1alpha1.ChaosEngine, experimentENVs *ENVDetails, clients environment.ClientSets) error

InstallChaosEngine installs the given go based chaos engine

func InstallLitmus

func InstallLitmus(testsDetails *types.ExperimentDetails) error

InstallLitmus installs the latest version of litmus

func InstallRbac

func InstallRbac(experimentsDetails *types.ExperimentDetails, rbacNamespace string) error

InstallGoRbac installs and configure rbac for running go based chaos

func Int32Ptr

func Int32Ptr(i int32) *int32

func Kubectl

func Kubectl(command ...string) error

func PodStatusCheck

func PodStatusCheck(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

PodStatusCheck checks the pod running status

func RunnerPodStatus

func RunnerPodStatus(experimentsDetails *types.ExperimentDetails, runnerNamespace string, clients environment.ClientSets) error

RunnerPodStatus will check the runner pod running state

func WaitForChaosResultCompletion

func WaitForChaosResultCompletion(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

WaitForChaosResultCompletion waits for chaosresult state to get completed

func WaitForEngineCompletion

func WaitForEngineCompletion(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

WaitForEngineCompletion waits for engine state to get completed

func WaitForRunnerCompletion

func WaitForRunnerCompletion(experimentsDetails *types.ExperimentDetails, clients environment.ClientSets) error

WaitForRunnerCompletion waits for runner pod completion

Types

type ENVDetails

type ENVDetails struct {
	ENV map[string]string
}

ENVDetails contains the ENV details

func (*ENVDetails) SetEnv

func (envDetails *ENVDetails) SetEnv(key, value string) *ENVDetails

SetEnv sets the env inside envDetails struct

Jump to

Keyboard shortcuts

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