Documentation ¶
Index ¶
- func AddAfterMatch(filepath, key, newvalue string) error
- func AddAnnotation(deployment, key, value, ns string) error
- func ChaosAbort(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func ChaosEngineVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func ChaosPodLogs(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func ChaosPodStatus(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func ChaosResultVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func CheckRunHistoryUpdate(testsDetails *types.TestDetails, clients environment.ClientSets, ...) error
- func CheckRunnerPodCreation(engineName, runnerNS string, clients environment.ClientSets) error
- func Cleanup() error
- func CreateChaosResource(testsDetails *types.TestDetails, fileData []byte, namespace string, ...) error
- func CreateDeployment(clients environment.ClientSets, deploymentName, image, namespace string) error
- func CreateNamespace(clients environment.ClientSets, namespaceName string) error
- func DeploymentCleanupCheck(testsDetails *types.TestDetails, deploymentName string, ...) error
- func DeploymentStatusCheck(testsDetails *types.TestDetails, deploymentName, deploymentNS string, ...) error
- func DownloadFile(filepath string, url string) error
- func EditFile(filepath, old, new string) error
- func EditKeyValue(filepath, key, oldvalue, newvalue string) error
- func GetAppNameAndIP(appLabel, appNS string, clients environment.ClientSets) (string, string, string, error)
- func GetApplicationNode(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func GetChaosEngineVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) (string, error)
- func GetChaosResultVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) (string, error)
- func GetImageTag(experimentImage string) string
- func GetJobPod(testsDetails *types.TestDetails, jobNamespace string, ...) error
- func GetRandomNode(clients environment.ClientSets) (*v1.Node, error)
- func GetRunHistoryStatus(testsDetails *types.TestDetails, clients environment.ClientSets) v1alpha1.HistoryDetails
- func GetSelectorNode(testsDetails *types.TestDetails, clients environment.ClientSets) (string, error)
- func GetUID(engineName, namespace string, clients environment.ClientSets) (string, error)
- func InstallAdminRbac(testsDetails *types.TestDetails) error
- func InstallGoChaosEngine(testsDetails *types.TestDetails, chaosEngine *v1alpha1.ChaosEngine, ...) error
- func InstallGoChaosExperiment(testsDetails *types.TestDetails, chaosExperiment *v1alpha1.ChaosExperiment, ...) error
- func InstallGoRbac(testsDetails *types.TestDetails, rbacNamespace string) error
- func InstallLitmus(testsDetails *types.TestDetails) error
- func Int32Ptr(i int32) *int32
- func Kubectl(command ...string) error
- func NodeCordon(testsDetails *types.TestDetails) error
- func NodeUncordon(testsDetails *types.TestDetails) error
- func OperatorStatusCheck(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func PodStatusCheck(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func PrepareChaos(testsDetails *types.TestDetails, chaosExperiment *v1alpha1.ChaosExperiment, ...) error
- func RunnerPodStatus(testsDetails *types.TestDetails, runnerNamespace string, ...) error
- func UpdateEngine(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func UpdateExperiment(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func UpdatePipelineStatus(testsDetails *types.TestDetails, coverageData string) error
- func UpdateResultTable(experimentDetails, testVerdict string, testsDetails *types.TestDetails) error
- func ValidateNetworkChaos(testsDetails *types.TestDetails, TargetPodIP, HelperPod string, ...) error
- func ValidateNodeName(nodeName string, clients environment.ClientSets, ...) error
- func ValidateTargetPodChaos(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func WaitForChaosResultCompletion(testsDetails *types.TestDetails, clients environment.ClientSets) error
- func WaitForEngineStatus(testsDetails *types.TestDetails, clients environment.ClientSets, status string) error
- func WaitForRunnerCompletion(testsDetails *types.TestDetails, clients environment.ClientSets) error
- type ENVDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAfterMatch ¶
AddAfterMatch will add a new line when a match is found
func AddAnnotation ¶
AddAnnotation will add or update annotation on an application
func ChaosAbort ¶
func ChaosAbort(testsDetails *types.TestDetails, clients environment.ClientSets) error
ChaosAbort will abort the execution of chaosexperiment
func ChaosEngineVerdict ¶
func ChaosEngineVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) error
ChaosEngineVerdict checks the chaosengine verdict
func ChaosPodLogs ¶
func ChaosPodLogs(testsDetails *types.TestDetails, clients environment.ClientSets) error
ChaosPodLogs will print the experiment and helper pod logs
func ChaosPodStatus ¶
func ChaosPodStatus(testsDetails *types.TestDetails, clients environment.ClientSets) error
ChaosPodStatus will check the creation of chaos pod
func ChaosResultVerdict ¶
func ChaosResultVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) error
ChaosResultVerdict checks the chaos result verdict
func CheckRunHistoryUpdate ¶
func CheckRunHistoryUpdate(testsDetails *types.TestDetails, clients environment.ClientSets, previousRunHistory v1alpha1.HistoryDetails) error
CheckRunHistoryUpdate checks the chaos result run history according to the ChaosResultVerdict
func CheckRunnerPodCreation ¶
func CheckRunnerPodCreation(engineName, runnerNS string, clients environment.ClientSets) error
CheckRunnerPodCreation will check for the create of runner pod
func Cleanup ¶
func Cleanup() error
Cleanup will delete the chaosengine and chaosexperiment in all namespaces
func CreateChaosResource ¶
func CreateChaosResource(testsDetails *types.TestDetails, fileData []byte, namespace string, clients environment.ClientSets) error
CreateChaosResource creates litmus components with given inputs
func CreateDeployment ¶
func CreateDeployment(clients environment.ClientSets, deploymentName, image, namespace string) error
CreateDeployment will create a deployment
func CreateNamespace ¶
func CreateNamespace(clients environment.ClientSets, namespaceName string) error
CreateNamespace is used to create a namespace
func DeploymentCleanupCheck ¶
func DeploymentCleanupCheck(testsDetails *types.TestDetails, deploymentName string, clients environment.ClientSets) error
DeploymentCleanupCheck checks the termination of deployment
func DeploymentStatusCheck ¶
func DeploymentStatusCheck(testsDetails *types.TestDetails, deploymentName, deploymentNS string, clients environment.ClientSets) error
DeploymentStatusCheck checks running status of deployment with deployment name and namespace
func DownloadFile ¶
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 EditKeyValue ¶
EditKeyValue will edit the value according to key content of the file
func GetAppNameAndIP ¶
func GetAppNameAndIP(appLabel, appNS string, clients environment.ClientSets) (string, string, string, error)
GetAppNameAndIP will return the first app name and its ip along with a helper pod to ping from the list of app pods
func GetApplicationNode ¶
func GetApplicationNode(testsDetails *types.TestDetails, clients environment.ClientSets) error
GetApplicationNode will give the node name of the application pod
func GetChaosEngineVerdict ¶
func GetChaosEngineVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) (string, error)
GetChaosEngineVerdict checks the chaosengine verdict
func GetChaosResultVerdict ¶
func GetChaosResultVerdict(testsDetails *types.TestDetails, clients environment.ClientSets) (string, error)
GetChaosResultVerdict checks the chaos result verdict
func GetImageTag ¶
GetImageTag returns the Go experiment image tag
func GetJobPod ¶
func GetJobPod(testsDetails *types.TestDetails, jobNamespace string, clients environment.ClientSets) error
GetJobPod checks the job pod is present or not
func GetRandomNode ¶
func GetRandomNode(clients environment.ClientSets) (*v1.Node, error)
GetRandomNode returns a random node name
func GetRunHistoryStatus ¶
func GetRunHistoryStatus(testsDetails *types.TestDetails, clients environment.ClientSets) v1alpha1.HistoryDetails
GetRunHistoryStatus fetches the chaos result run history
func GetSelectorNode ¶
func GetSelectorNode(testsDetails *types.TestDetails, clients environment.ClientSets) (string, error)
GetSelectorNode will return a node other than the application node selected for using in node selector in chaos engine spec
func GetUID ¶
func GetUID(engineName, namespace string, clients environment.ClientSets) (string, error)
GetUID will return the uid from chaosengine
func InstallAdminRbac ¶
func InstallAdminRbac(testsDetails *types.TestDetails) error
InstallAdminRbac installs admin rbac to run chaos
func InstallGoChaosEngine ¶
func InstallGoChaosEngine(testsDetails *types.TestDetails, chaosEngine *v1alpha1.ChaosEngine, engineNamespace string, setAppInfo bool, clients environment.ClientSets) error
InstallGoChaosEngine installs the given go based chaos engine
func InstallGoChaosExperiment ¶
func InstallGoChaosExperiment(testsDetails *types.TestDetails, chaosExperiment *v1alpha1.ChaosExperiment, experimentNamespace string, clients environment.ClientSets) error
InstallGoChaosExperiment installs the given go based chaos experiment
func InstallGoRbac ¶
func InstallGoRbac(testsDetails *types.TestDetails, rbacNamespace string) error
InstallGoRbac installs and configure rbac for running go based chaos
func InstallLitmus ¶
func InstallLitmus(testsDetails *types.TestDetails) error
InstallLitmus installs the latest version of litmus
func NodeCordon ¶
func NodeCordon(testsDetails *types.TestDetails) error
NodeCordon will cordon the given node
func NodeUncordon ¶
func NodeUncordon(testsDetails *types.TestDetails) error
NodeUncordon will uncordon the given node
func OperatorStatusCheck ¶
func OperatorStatusCheck(testsDetails *types.TestDetails, clients environment.ClientSets) error
OperatorStatusCheck checks the running status of chaos operator
func PodStatusCheck ¶
func PodStatusCheck(testsDetails *types.TestDetails, clients environment.ClientSets) error
PodStatusCheck checks the pod running status
func PrepareChaos ¶
func PrepareChaos(testsDetails *types.TestDetails, chaosExperiment *v1alpha1.ChaosExperiment, chaosEngine *v1alpha1.ChaosEngine, clients environment.ClientSets, annotation bool) error
PrepareChaos install all the Chaos resourses like rbac, experiment and engine
func RunnerPodStatus ¶
func RunnerPodStatus(testsDetails *types.TestDetails, runnerNamespace string, clients environment.ClientSets) error
RunnerPodStatus will check the runner pod running state
func UpdateEngine ¶
func UpdateEngine(testsDetails *types.TestDetails, clients environment.ClientSets) error
UpdateEngine updating engine
func UpdateExperiment ¶
func UpdateExperiment(testsDetails *types.TestDetails, clients environment.ClientSets) error
UpdateExperiment updating experiment
func UpdatePipelineStatus ¶
func UpdatePipelineStatus(testsDetails *types.TestDetails, coverageData string) error
UpdatePipelineStatus will update the status of pipeline at the end of all jobs
func UpdateResultTable ¶
func UpdateResultTable(experimentDetails, testVerdict string, testsDetails *types.TestDetails) error
UpdateResultTable will update the result of pipelines in a table on github using python update script
func ValidateNetworkChaos ¶
func ValidateNetworkChaos(testsDetails *types.TestDetails, TargetPodIP, HelperPod string, clients environment.ClientSets) error
ValidateNetworkChaos checks the network interruption in the target pod specified
func ValidateNodeName ¶
func ValidateNodeName(nodeName string, clients environment.ClientSets, testsDetails *types.TestDetails) error
ValidateNodeName validates a given target node name with the target node name present in the chaos result
func ValidateTargetPodChaos ¶
func ValidateTargetPodChaos(testsDetails *types.TestDetails, clients environment.ClientSets) error
ValidateTargetPodChaos will check if the chaos induced on target pod or not.
func WaitForChaosResultCompletion ¶
func WaitForChaosResultCompletion(testsDetails *types.TestDetails, clients environment.ClientSets) error
WaitForChaosResultCompletion waits for chaosresult state to get completed
func WaitForEngineStatus ¶
func WaitForEngineStatus(testsDetails *types.TestDetails, clients environment.ClientSets, status string) error
WaitForEngineStatus waits for engine state to get completed
func WaitForRunnerCompletion ¶
func WaitForRunnerCompletion(testsDetails *types.TestDetails, clients environment.ClientSets) error
WaitForRunnerCompletion waits for runner pod completion
Types ¶
type ENVDetails ¶
ENVDetails contains the ENV details
func (*ENVDetails) SetEnv ¶
func (envDetails *ENVDetails) SetEnv(key, value string) *ENVDetails
SetEnv sets the env inside envDetails struct