Documentation ¶
Index ¶
- Constants
- Variables
- func FindRookRoot() (string, error)
- func GetEnvVarWithDefault(env, defaultValue string) string
- func IsKubectlErrorNotFound(output string, err error) bool
- func IsPlatformOpenShift() bool
- func Retry(count uint16, wait time.Duration, description string, f func() bool) bool
- func TestEnvName() string
- func TestRetryNumber() int
- type CommandArgs
- type CommandOut
- type HelmHelper
- type K8sHelper
- func (k8sh *K8sHelper) ChangeHostnames() error
- func (k8sh *K8sHelper) CheckPodCountAndState(podName string, namespace string, minExpected int, expectedPhase string) bool
- func (k8sh *K8sHelper) CheckPvcCountAndStatus(podName string, namespace string, expectedPvcCount int, expectedStatus string) bool
- func (k8sh *K8sHelper) CheckSnapshotISReadyToUse(name, namespace string, retries int) (bool, error)
- func (k8sh *K8sHelper) CollectPodLogsFromLabel(podLabel, namespace, testName, platformName string)
- func (k8sh *K8sHelper) CountPodsWithLabel(label string, namespace string) (int, error)
- func (k8sh *K8sHelper) CreateAnonSystemClusterBinding()
- func (k8sh *K8sHelper) CreateExternalRGWService(namespace, storeName string) error
- func (k8sh *K8sHelper) CreateNamespace(namespace string) error
- func (k8sh *K8sHelper) CreateOpConfigMap(namespace string) error
- func (k8sh *K8sHelper) CreateSnapshotCRD() error
- func (k8sh *K8sHelper) CreateSnapshotController() error
- func (k8sh *K8sHelper) DeletePod(namespace, name string) error
- func (k8sh *K8sHelper) DeletePods(pods ...string) (msg string, err error)
- func (k8sh *K8sHelper) DeletePvcWithLabel(namespace string, podName string) bool
- func (k8sh *K8sHelper) DeleteResource(args ...string) error
- func (k8sh *K8sHelper) DeleteResourceAndWait(wait bool, args ...string) error
- func (k8sh *K8sHelper) DeleteRoleAndBindings(name, namespace string) error
- func (k8sh *K8sHelper) DeleteRoleBinding(name, namespace string) error
- func (k8sh *K8sHelper) DeleteSnapshotCRD() error
- func (k8sh *K8sHelper) DeleteSnapshotController() error
- func (k8sh *K8sHelper) Exec(namespace, podName, command string, commandArgs []string) (string, error)
- func (k8sh *K8sHelper) ExecRemote(namespace, command string, commandArgs []string) (string, error)
- func (k8sh *K8sHelper) ExecRemoteWithRetry(retries int, namespace, command string, commandArgs []string) (string, error)
- func (k8sh *K8sHelper) ExecWithRetry(retries int, namespace, podName, command string, commandArgs []string) (string, error)
- func (k8sh *K8sHelper) GetDockerImage(image string) error
- func (k8sh *K8sHelper) GetEventsFromNamespace(namespace, testName, platformName string)
- func (k8sh *K8sHelper) GetExternalRGWServiceURL(storeName string, namespace string) (string, error)
- func (k8sh *K8sHelper) GetInternalRGWServiceURL(storeName string, namespace string) (string, error)
- func (k8sh *K8sHelper) GetK8sServerVersion() string
- func (k8sh *K8sHelper) GetLogsFromNamespace(namespace, testName, platformName string)
- func (k8sh *K8sHelper) GetPV(name string) (*v1.PersistentVolume, error)
- func (k8sh *K8sHelper) GetPVCAccessModes(namespace string, name string) ([]v1.PersistentVolumeAccessMode, error)
- func (k8sh *K8sHelper) GetPVCStatus(namespace string, name string) (v1.PersistentVolumeClaimPhase, error)
- func (k8sh *K8sHelper) GetPVCVolumeName(namespace string, name string) (string, error)
- func (k8sh *K8sHelper) GetPodDescribeFromNamespace(namespace, testName, platformName string)
- func (k8sh *K8sHelper) GetPodDetails(podNamePattern string, namespace string) (string, error)
- func (k8sh *K8sHelper) GetPodEvents(podNamePattern string, namespace string) (*v1.EventList, error)
- func (k8sh *K8sHelper) GetPodHostID(podNamePattern string, namespace string) (string, error)
- func (k8sh *K8sHelper) GetPodNamesForApp(appName, namespace string) ([]string, error)
- func (k8sh *K8sHelper) GetRGWServiceURL(storeName string, namespace string) (string, error)
- func (k8sh *K8sHelper) GetResource(args ...string) (string, error)
- func (k8sh *K8sHelper) GetResourceStatus(kind, name, namespace string) (string, error)
- func (k8sh *K8sHelper) GetService(servicename string, namespace string) (*v1.Service, error)
- func (k8sh *K8sHelper) GetServiceNodePort(serviceName string, namespace string) (string, error)
- func (k8sh *K8sHelper) GetVolumeResourceName(namespace, pvcName string) (string, error)
- func (k8sh *K8sHelper) IsCRDPresent(crdName string) bool
- func (k8sh *K8sHelper) IsDefaultStorageClassPresent() (bool, error)
- func (k8sh *K8sHelper) IsPodInError(podNamePattern, namespace, reason, containingMessage string) bool
- func (k8sh *K8sHelper) IsPodInExpectedState(podNamePattern string, namespace string, state string) bool
- func (k8sh *K8sHelper) IsPodRunning(name string, namespace string) bool
- func (k8sh *K8sHelper) IsPodTerminated(name string, namespace string) bool
- func (k8sh *K8sHelper) IsPodTerminatedWithOpts(name string, namespace string, getOpts metav1.GetOptions) bool
- func (k8sh *K8sHelper) IsPodWithLabelPresent(label string, namespace string) bool
- func (k8sh *K8sHelper) IsRookInstalled(namespace string) bool
- func (k8sh *K8sHelper) IsServiceUp(name string, namespace string) bool
- func (k8sh *K8sHelper) IsStorageClassPresent(name string) (bool, error)
- func (k8sh *K8sHelper) Kubectl(args ...string) (string, error)
- func (k8sh *K8sHelper) KubectlWithStdin(stdin string, args ...string) (string, error)
- func (k8sh *K8sHelper) MakeContext() *clusterd.Context
- func (k8sh *K8sHelper) PrintEventsForNamespace(namespace string)
- func (k8sh *K8sHelper) PrintPVCs(namespace string, detailed bool)
- func (k8sh *K8sHelper) PrintPVs(detailed bool)
- func (k8sh *K8sHelper) PrintPodDescribe(namespace string, args ...string)
- func (k8sh *K8sHelper) PrintPodStatus(namespace string)
- func (k8sh *K8sHelper) PrintResources(namespace, name string)
- func (k8sh *K8sHelper) PrintStorageClasses(detailed bool)
- func (k8sh *K8sHelper) ReadFromPod(namespace, podName, filename, expectedMessage string) error
- func (k8sh *K8sHelper) ReadFromPodRetry(namespace, podName, filename, expectedMessage string, retries int) error
- func (k8sh *K8sHelper) ResourceOperation(action string, manifest string) error
- func (k8sh *K8sHelper) ResourceOperationFromTemplate(action string, podDefinition string, config map[string]string) (string, error)
- func (k8sh *K8sHelper) RestoreHostnames() ([]string, error)
- func (k8sh *K8sHelper) RunCommandInPod(namespace, name, cmd string) (string, error)
- func (k8sh *K8sHelper) ScaleStatefulSet(statefulSetName, namespace string, replicationSize int) error
- func (k8sh *K8sHelper) SetDeploymentVersion(namespace, deploymentName, containerName, version string) error
- func (k8sh *K8sHelper) VersionAtLeast(minVersion string) bool
- func (k8sh *K8sHelper) VersionMinorMatches(minVersion string) (string, bool)
- func (k8sh *K8sHelper) WaitForCronJob(name, namespace string) error
- func (k8sh *K8sHelper) WaitForCustomResourceDeletion(namespace, name string, checkerFunc func() error) error
- func (k8sh *K8sHelper) WaitForDeploymentCount(label, namespace string, count int) error
- func (k8sh *K8sHelper) WaitForDeploymentCountWithRetries(label, namespace string, count, retries int) error
- func (k8sh *K8sHelper) WaitForLabeledDeploymentsToBeReady(label, namespace string) error
- func (k8sh *K8sHelper) WaitForLabeledDeploymentsToBeReadyWithRetries(label, namespace string, retries int) error
- func (k8sh *K8sHelper) WaitForLabeledPodsToRun(label, namespace string) error
- func (k8sh *K8sHelper) WaitForLabeledPodsToRunWithRetries(label string, namespace string, retries int) error
- func (k8sh *K8sHelper) WaitForPodCount(label, namespace string, count int) error
- func (k8sh *K8sHelper) WaitForSnapshotController(retries int) error
- func (k8sh *K8sHelper) WaitUntilNameSpaceIsDeleted(namespace string) bool
- func (k8sh *K8sHelper) WaitUntilPVCIsBound(namespace string, pvcname string) bool
- func (k8sh *K8sHelper) WaitUntilPVCIsDeleted(namespace string, pvcname string) bool
- func (k8sh *K8sHelper) WaitUntilPVCIsExpanded(namespace, pvcname, size string) bool
- func (k8sh *K8sHelper) WaitUntilPodInNamespaceIsDeleted(podNamePattern string, namespace string) bool
- func (k8sh *K8sHelper) WaitUntilPodIsDeleted(name, namespace string) bool
- func (k8sh *K8sHelper) WaitUntilPodWithLabelDeleted(label string, namespace string) bool
- func (k8sh *K8sHelper) WaitUntilResourceIsDeleted(kind, namespace, name string) error
- func (k8sh *K8sHelper) WriteToPod(namespace, podName, filename, message string) error
- func (k8sh *K8sHelper) WriteToPodRetry(namespace, podName, filename, message string, retries int) error
Constants ¶
const ( // RetryInterval param for test - wait time while in RetryLoop RetryInterval = 5 // TestMountPath is the path inside a test pod where storage is mounted TestMountPath = "/tmp/testrook" )
Variables ¶
var ( // RetryLoop params for tests. RetryLoop = TestRetryNumber() )
Functions ¶
func FindRookRoot ¶ added in v1.4.9
func GetEnvVarWithDefault ¶ added in v1.5.0
GetEnvVarWithDefault get environment variable by key.
func IsKubectlErrorNotFound ¶ added in v0.8.0
func IsPlatformOpenShift ¶ added in v1.5.0
func IsPlatformOpenShift() bool
IsPlatformOpenShift check if the platform is openshift or not
func Retry ¶ added in v1.5.5
Retry executes the function ('f') 'count' times waiting for 'wait' duration between each attempt to run the function. Print the 'description' before all test info messages. Returns true the first time function 'f' returns true or false if 'f' never returns true.
func TestEnvName ¶ added in v1.5.0
func TestEnvName() string
TestEnvName gets the name of the test environment. In the CI it is "aws_1.18.x" or similar.
func TestRetryNumber ¶ added in v1.5.0
func TestRetryNumber() int
TestRetryNumber get the max retry. Example, for OpenShift it's 40.
Types ¶
type CommandArgs ¶
type CommandArgs struct { Command string CmdArgs []string PipeToStdIn string EnvironmentVariable []string }
CommandArgs is a warpper for cmd args
type CommandOut ¶
CommandOut is a wrapper for cmd out returned after executing command args
func ExecuteCommand ¶
func ExecuteCommand(cmdStruct CommandArgs) CommandOut
ExecuteCommand executes a os command with stdin and returns output
type HelmHelper ¶ added in v0.6.0
type HelmHelper struct { HelmPath string // contains filtered or unexported fields }
HelmHelper is wrapper for running helm commands
func NewHelmHelper ¶ added in v0.6.0
func NewHelmHelper(helmPath string) *HelmHelper
NewHelmHelper creates a instance of HelmHelper
func (*HelmHelper) DeleteLocalRookHelmChart ¶ added in v0.6.0
func (h *HelmHelper) DeleteLocalRookHelmChart(namespace, deployName string) error
DeleteLocalRookHelmChart uninstalls a give helm deploy
func (*HelmHelper) Execute ¶ added in v0.6.0
func (h *HelmHelper) Execute(args ...string) (string, error)
Execute is wrapper for executing helm commands
func (*HelmHelper) InstallLocalRookHelmChart ¶ added in v0.6.0
func (h *HelmHelper) InstallLocalRookHelmChart(namespace, chart string, values map[string]interface{}) error
InstallLocalRookHelmChart installs a give helm chart
type K8sHelper ¶
type K8sHelper struct { Clientset *kubernetes.Clientset RookClientset *rookclient.Clientset BucketClientset *bktclient.Clientset RunningInCluster bool T func() *testing.T // contains filtered or unexported fields }
K8sHelper is a helper for common kubectl commands
func CreateK8sHelper ¶ added in v0.6.0
CreateK8sHelper creates a instance of k8sHelper
func (*K8sHelper) ChangeHostnames ¶ added in v0.8.3
ChangeHostnames modifies the node hostname label to run tests in an environment where the node name is different from the hostname label
func (*K8sHelper) CheckPodCountAndState ¶ added in v0.6.0
func (k8sh *K8sHelper) CheckPodCountAndState(podName string, namespace string, minExpected int, expectedPhase string) bool
CheckPodCountAndState returns true if expected number of pods with matching name are found and are in expected state
func (*K8sHelper) CheckPvcCountAndStatus ¶ added in v0.7.0
func (k8sh *K8sHelper) CheckPvcCountAndStatus(podName string, namespace string, expectedPvcCount int, expectedStatus string) bool
CheckPvcCount returns True if expected number pvs for a app are found
func (*K8sHelper) CheckSnapshotISReadyToUse ¶ added in v1.5.0
CheckSnapshotISReadyToUse checks snapshot is ready to use
func (*K8sHelper) CollectPodLogsFromLabel ¶ added in v1.1.0
CollectPodLogsFromLabel collects logs for pods with the given label
func (*K8sHelper) CountPodsWithLabel ¶ added in v0.8.0
func (*K8sHelper) CreateAnonSystemClusterBinding ¶ added in v0.6.0
func (k8sh *K8sHelper) CreateAnonSystemClusterBinding()
CreateAnonSystemClusterBinding Creates anon-user-access clusterrolebinding for cluster-admin role - used by kubeadm env.
func (*K8sHelper) CreateExternalRGWService ¶ added in v0.6.0
CreateExternalRGWService creates a service for rgw access external to the cluster on a node port
func (*K8sHelper) CreateNamespace ¶ added in v0.8.0
func (*K8sHelper) CreateOpConfigMap ¶ added in v1.8.0
func (*K8sHelper) CreateSnapshotCRD ¶ added in v1.5.0
CreateSnapshotCRD creates the snapshot CRD
func (*K8sHelper) CreateSnapshotController ¶ added in v1.5.0
CreateSnapshotController creates the snapshotcontroller and required RBAC
func (*K8sHelper) DeletePod ¶ added in v0.9.0
DeletePod performs a kubectl delete pod on the given pod
func (*K8sHelper) DeletePods ¶ added in v0.9.0
DeletePods performs a kubectl delete pod on the given pods
func (*K8sHelper) DeletePvcWithLabel ¶ added in v0.7.0
func (*K8sHelper) DeleteResource ¶
DeleteResource performs a kubectl delete on the given args
func (*K8sHelper) DeleteResourceAndWait ¶ added in v0.9.0
DeleteResource performs a kubectl delete on give args. If wait is false, a flag will be passed to indicate the delete should return immediately
func (*K8sHelper) DeleteRoleAndBindings ¶ added in v0.6.0
func (*K8sHelper) DeleteRoleBinding ¶ added in v0.8.0
func (*K8sHelper) DeleteSnapshotCRD ¶ added in v1.5.0
DeleteSnapshotCRD deletes the snapshot CRD
func (*K8sHelper) DeleteSnapshotController ¶ added in v1.5.0
DeleteSnapshotController delete the snapshotcontroller and required RBAC
func (*K8sHelper) ExecRemote ¶ added in v1.6.8
func (*K8sHelper) ExecRemoteWithRetry ¶ added in v1.6.8
func (k8sh *K8sHelper) ExecRemoteWithRetry(retries int, namespace, command string, commandArgs []string) (string, error)
ExecRemoteWithRetry will attempt to remotely (in toolbox) run a command "retries" times, waiting 3s between each call. Upon success, returns the output.
func (*K8sHelper) ExecWithRetry ¶ added in v1.0.0
func (k8sh *K8sHelper) ExecWithRetry(retries int, namespace, podName, command string, commandArgs []string) (string, error)
ExecWithRetry will attempt to run a command "retries" times, waiting 3s between each call. Upon success, returns the output.
func (*K8sHelper) GetDockerImage ¶ added in v0.9.0
func (*K8sHelper) GetEventsFromNamespace ¶ added in v1.5.0
func (*K8sHelper) GetExternalRGWServiceURL ¶ added in v0.6.0
GetRGWServiceURL returns URL of ceph RGW service in the cluster
func (*K8sHelper) GetInternalRGWServiceURL ¶ added in v0.6.0
GetRGWServiceURL returns URL of ceph RGW service in the cluster
func (*K8sHelper) GetK8sServerVersion ¶
GetK8sServerVersion returns k8s server version under test
func (*K8sHelper) GetLogsFromNamespace ¶ added in v1.1.0
GetLogsFromNamespace collects logs for all containers in all pods in the namespace
func (*K8sHelper) GetPV ¶ added in v0.9.0
func (k8sh *K8sHelper) GetPV(name string) (*v1.PersistentVolume, error)
GetPV returns PV by name
func (*K8sHelper) GetPVCAccessModes ¶ added in v0.7.0
func (k8sh *K8sHelper) GetPVCAccessModes(namespace string, name string) ([]v1.PersistentVolumeAccessMode, error)
GetPVCAccessModes returns AccessModes on PVC
func (*K8sHelper) GetPVCStatus ¶
func (k8sh *K8sHelper) GetPVCStatus(namespace string, name string) (v1.PersistentVolumeClaimPhase, error)
GetPVCStatus returns status of PVC
func (*K8sHelper) GetPVCVolumeName ¶ added in v0.9.0
GetPVCVolumeName returns volume name of PVC
func (*K8sHelper) GetPodDescribeFromNamespace ¶ added in v1.1.0
func (*K8sHelper) GetPodDetails ¶
GetPodDetails returns details about a pod
func (*K8sHelper) GetPodEvents ¶ added in v0.6.0
GetPodEvents returns events about a pod
func (*K8sHelper) GetPodHostID ¶
GetPodHostID returns HostIP address of a pod
func (*K8sHelper) GetPodNamesForApp ¶ added in v0.8.0
func (*K8sHelper) GetRGWServiceURL ¶
func (*K8sHelper) GetResource ¶
GetResource performs a kubectl get on give args
func (*K8sHelper) GetResourceStatus ¶ added in v1.7.1
func (*K8sHelper) GetService ¶
GetService returns output from "kubectl get svc $NAME" command
func (*K8sHelper) GetServiceNodePort ¶ added in v0.6.0
GetServiceNodePort returns nodeProt of service
func (*K8sHelper) GetVolumeResourceName ¶ added in v0.8.0
GetVolumeResourceName gets the Volume object name from the PVC
func (*K8sHelper) IsCRDPresent ¶
IsCRDPresent returns true if custom resource definition is present
func (*K8sHelper) IsDefaultStorageClassPresent ¶ added in v0.8.0
func (*K8sHelper) IsPodInError ¶ added in v0.6.0
func (k8sh *K8sHelper) IsPodInError(podNamePattern, namespace, reason, containingMessage string) bool
IsPodInError returns true if a Pod is in error status with the given reason and contains the given message
func (*K8sHelper) IsPodInExpectedState ¶
func (k8sh *K8sHelper) IsPodInExpectedState(podNamePattern string, namespace string, state string) bool
IsPodInExpectedState waits for 90s for a pod to be an expected state If the pod is in expected state within 90s true is returned, if not false
func (*K8sHelper) IsPodRunning ¶
IsPodRunning returns true if a Pod is running status or goes to Running status within 90s else returns false
func (*K8sHelper) IsPodTerminated ¶
IsPodTerminated wrapper around IsPodTerminatedWithOpts()
func (*K8sHelper) IsPodTerminatedWithOpts ¶ added in v0.9.0
func (k8sh *K8sHelper) IsPodTerminatedWithOpts(name string, namespace string, getOpts metav1.GetOptions) bool
IsPodTerminatedWithOpts returns true if a Pod is terminated status or goes to Terminated status within 90s else returns false\
func (*K8sHelper) IsPodWithLabelPresent ¶ added in v0.7.0
IsPodWithLabelPresent return true if there is at least one Pod with the label is present.
func (*K8sHelper) IsRookInstalled ¶ added in v0.6.0
IsRookInstalled returns true is rook-ceph-mgr service is running(indicating rook is installed)
func (*K8sHelper) IsServiceUp ¶
IsServiceUp returns true if a service is up or comes up within 150s, else returns false
func (*K8sHelper) IsStorageClassPresent ¶
IsStorageClassPresent returns true if storageClass is present, if not false
func (*K8sHelper) KubectlWithStdin ¶
KubectlWithStdin is wrapper for executing kubectl commands in stdin
func (*K8sHelper) MakeContext ¶ added in v0.8.0
func (*K8sHelper) PrintEventsForNamespace ¶ added in v0.8.0
func (*K8sHelper) PrintPodDescribe ¶ added in v0.8.0
func (*K8sHelper) PrintPodStatus ¶ added in v0.8.0
PrintPodStatus log out the status phase of a pod
func (*K8sHelper) PrintResources ¶ added in v1.6.0
func (*K8sHelper) PrintStorageClasses ¶ added in v0.8.0
func (*K8sHelper) ReadFromPod ¶ added in v0.9.0
func (*K8sHelper) ReadFromPodRetry ¶ added in v0.9.0
func (*K8sHelper) ResourceOperation ¶
ResourceOperation performs a kubectl action on a pod definition
func (*K8sHelper) ResourceOperationFromTemplate ¶
func (k8sh *K8sHelper) ResourceOperationFromTemplate(action string, podDefinition string, config map[string]string) (string, error)
ResourceOperationFromTemplate performs a kubectl action from a template file after replacing its context
func (*K8sHelper) RestoreHostnames ¶ added in v0.8.3
RestoreHostnames removes the test suffix from the node hostname labels
func (*K8sHelper) RunCommandInPod ¶ added in v1.5.0
RunCommandInPod runs the provided command inside the pod
func (*K8sHelper) ScaleStatefulSet ¶ added in v0.7.0
func (*K8sHelper) SetDeploymentVersion ¶ added in v0.9.0
func (k8sh *K8sHelper) SetDeploymentVersion(namespace, deploymentName, containerName, version string) error
SetDeploymentVersion sets the container version on the deployment. It is assumed to be the rook/ceph image.
func (*K8sHelper) VersionAtLeast ¶ added in v0.6.0
func (*K8sHelper) VersionMinorMatches ¶ added in v1.1.1
func (*K8sHelper) WaitForCronJob ¶ added in v1.6.0
func (*K8sHelper) WaitForCustomResourceDeletion ¶ added in v0.9.0
func (k8sh *K8sHelper) WaitForCustomResourceDeletion(namespace, name string, checkerFunc func() error) error
WaitForCustomResourceDeletion waits for the CRD deletion
func (*K8sHelper) WaitForDeploymentCount ¶ added in v1.2.0
WaitForDeploymentCount waits until the desired number of deployments with the label exist. The deployments are not guaranteed to be running, only existing.
func (*K8sHelper) WaitForDeploymentCountWithRetries ¶ added in v1.2.1
func (k8sh *K8sHelper) WaitForDeploymentCountWithRetries(label, namespace string, count, retries int) error
WaitForDeploymentCountWithRetries waits until the desired number of deployments with the label exist, retrying the specified number of times. The deployments are not guaranteed to be running, only existing.
func (*K8sHelper) WaitForLabeledDeploymentsToBeReady ¶ added in v1.2.0
WaitForLabeledDeploymentsToBeReady waits for all deployments matching the given label selector to be fully ready with a default timeout.
func (*K8sHelper) WaitForLabeledDeploymentsToBeReadyWithRetries ¶ added in v1.2.0
func (k8sh *K8sHelper) WaitForLabeledDeploymentsToBeReadyWithRetries(label, namespace string, retries int) error
WaitForLabeledDeploymentsToBeReadyWithRetries waits for all deployments matching the given label selector to be fully ready. Retry the number of times given.
func (*K8sHelper) WaitForLabeledPodsToRun ¶ added in v0.9.0
WaitForLabeledPodsToRun calls WaitForLabeledPodsToRunWithRetries with the default number of retries
func (*K8sHelper) WaitForLabeledPodsToRunWithRetries ¶ added in v0.9.0
func (k8sh *K8sHelper) WaitForLabeledPodsToRunWithRetries(label string, namespace string, retries int) error
WaitForLabeledPodsToRunWithRetries returns true if a Pod is running status or goes to Running status within 90s else returns false
func (*K8sHelper) WaitForPodCount ¶ added in v0.8.0
WaitForPodCount waits until the desired number of pods with the label are started
func (*K8sHelper) WaitForSnapshotController ¶ added in v1.5.0
WaitForSnapshotController check snapshotcontroller is ready within given retries count.
func (*K8sHelper) WaitUntilNameSpaceIsDeleted ¶ added in v0.6.0
WaitUntilNameSpaceIsDeleted waits for namespace to be deleted for 180s. If namespace is deleted True is returned, if not false.
func (*K8sHelper) WaitUntilPVCIsBound ¶
WaitUntilPVCIsBound waits for a PVC to be in bound state for 90 seconds if PVC goes to Bound state within 90s True is returned, if not false
func (*K8sHelper) WaitUntilPVCIsDeleted ¶ added in v0.6.0
func (*K8sHelper) WaitUntilPVCIsExpanded ¶ added in v1.1.0
WaitUntilPVCIsExpanded waits for a PVC to be resized for specified value
func (*K8sHelper) WaitUntilPodInNamespaceIsDeleted ¶
func (k8sh *K8sHelper) WaitUntilPodInNamespaceIsDeleted(podNamePattern string, namespace string) bool
WaitUntilPodInNamespaceIsDeleted waits for 90s for a pod in a namespace to be terminated If the pod disappears within 90s true is returned, if not false
func (*K8sHelper) WaitUntilPodIsDeleted ¶
WaitUntilPodIsDeleted waits for 90s for a pod to be terminated If the pod disappears within 90s true is returned, if not false
func (*K8sHelper) WaitUntilPodWithLabelDeleted ¶ added in v0.6.0
WaitUntilPodWithLabelDeleted returns true if a Pod is deleted within 90s else returns false
func (*K8sHelper) WaitUntilResourceIsDeleted ¶ added in v1.7.1
func (*K8sHelper) WriteToPod ¶ added in v0.9.0
WriteToPod write file in Pod