package
0.0.0-20191024030528-a481964b876e
Repository: https://github.com/divinerapier/learn-kubernetes.git
Documentation: pkg.go.dev

# Functions

CheckPodsRunningReady returns whether all pods whose names are listed in podNames in namespace ns are running and ready, using c and waiting at most timeout.
CheckPodsRunningReadyOrSucceeded returns whether all pods whose names are listed in podNames in namespace ns are running and ready, or succeeded; use c and waiting at most timeout.
CountRemainingPods queries the server to count number of remaining pods, and number of pods that had a missing deletion timestamp.
CreateClientPod defines and creates a pod with a mounted PV.
CreateExecPodOrFail creates a agnhost pause pod used as a vessel for kubectl exec commands.
CreatePod with given claims based on node selector.
CreatePodOrFail creates a pod with the specified containerPorts.
CreateSecPod creates security pod with given claims.
CreateSecPodWithNodeSelection creates security pod with given claims.
CreateUnschedulablePod with given claims based on node selector.
CreateWaitAndDeletePod creates the test pod, wait for (hopefully) success, and then delete the pod.
DeletePodOrFail deletes the pod of the specified namespace and name.
DeletePodWithWait deletes the passed-in pod and waits for the pod to be terminated.
DeletePodWithWaitByName deletes the named and namespaced pod and waits for the pod to be terminated.
DumpAllPodInfo logs basic info for all pods.
DumpAllPodInfoForNamespace logs all pod information for a given namespace.
FilterNonRestartablePods filters out pods that will never get recreated if deleted after termination.
GetPodLogs returns the logs of the specified container (namespace/pod/container).
GetPodsInNamespace returns the pods in the given namespace.
GetPodsScheduled returns a number of currently scheduled and not scheduled Pods.
GetPreviousPodLogs returns the logs of the previous instance of the specified container (namespace/pod/container).
LogPodStates logs basic info of provided pods for debugging.
MakePod returns a pod definition based on the namespace.
MakeSecPod returns a pod definition based on the namespace.
NewExecPodSpec returns the pod spec of hostexec pod.
NewProxyResponseChecker returns a context for checking pods responses.
PatchContainerImages replaces the specified Container Registry with a custom one provided via the KUBE_TEST_REPO_LIST env variable.
PodsCreated returns a pod list matched by the given name.
PodsCreatedByLabel returns a created pod list matched by the given label.
PodsResponding waits for the pods to response.
SetAffinity sets affinity to nodeName to nodeSelection.
SetAntiAffinity sets anti-affinity to nodeName to nodeSelection.
VerifyPods checks if the specified pod is responding.
VerifyPodsRunning checks if the specified pod is running.
WaitForControlledPods waits up to podListTimeout for getting pods of the specified controller name and return them.
WaitForControlledPodsRunning waits up to 10 minutes for pods to become Running.
WaitForMatchPodsCondition finds match pods based on the input ListOptions.
WaitForNRestartablePods tries to list restarting pods using ps until it finds expect of them, returning their names if it can do so before timeout.
WaitForPodCondition waits a pods to be matched to the given condition.
WaitForPodNameRunningInNamespace waits default amount of time (PodStartTimeout) for the specified pod to become running.
WaitForPodNameUnschedulableInNamespace returns an error if it takes too long for the pod to become Pending and have condition Status equal to Unschedulable, if the pod Get api returns an error (IsNotFound or other), or if the pod failed with an unexpected reason.
WaitForPodNoLongerRunningInNamespace waits default amount of time (defaultPodDeletionTimeout) for the specified pod to stop running.
WaitForPodNotFoundInNamespace returns an error if it takes too long for the pod to fully terminate.
WaitForPodNotPending returns an error if it took too long for the pod to go out of pending state.
WaitForPodRunningInNamespace waits default amount of time (podStartTimeout) for the specified pod to become running.
WaitForPodRunningInNamespaceSlow waits an extended amount of time (slowPodStartTimeout) for the specified pod to become running.
WaitForPodsGone waits until there are no pods left in the PodStore.
WaitForPodsInactive waits until there are no active pods left in the PodStore.
WaitForPodsReady waits for the pods to become ready.
WaitForPodsRunningReady waits up to timeout to ensure that all pods in namespace ns are either running and ready, or failed but controlled by a controller.
WaitForPodSuccessInNamespace returns nil if the pod reached state success, or an error if it reached failure or until podStartupTimeout.
WaitForPodSuccessInNamespaceSlow returns nil if the pod reached state success, or an error if it reached failure or until slowPodStartupTimeout.
WaitForPodsWithLabel waits up to podListTimeout for getting pods with certain label.
WaitForPodsWithLabelRunningReady waits for exact amount of matching pods to become running and ready.
WaitForPodsWithLabelScheduled waits for all matching pods to become scheduled and at least one matching pod exists.
WaitForPodTerminatedInNamespace returns an error if it takes too long for the pod to terminate, if the pod Get api returns an error (IsNotFound or other), or if the pod failed (and thus did not terminate) with an unexpected reason.
WaitForPodToDisappear waits the given timeout duration for the specified pod to disappear.
WaitTimeoutForPodNoLongerRunningInNamespace waits the given timeout duration for the specified pod to stop.
WaitTimeoutForPodReadyInNamespace waits the given timeout diration for the specified pod to be ready and running.
WaitTimeoutForPodRunningInNamespace waits the given timeout duration for the specified pod to become running.

# Constants

PodDeleteTimeout is how long to wait for a pod to be deleted.

# Variables

BusyBoxImage is the image URI of BusyBox.

# Structs

NodeSelection specifies where to run a pod, using a combination of fixed node name, node selector and/or affinity.
ProxyResponseChecker is a context for checking pods responses by issuing GETs to them (via the API proxy) and verifying that they answer with their own pod name.