Documentation ¶
Index ¶
- Constants
- func DumpAllPodInfoForNamespace(c clientset.Interface, namespace, reportDir string)
- func GetPodLogs(c clientset.Interface, namespace, podName, containerName string) (string, error)
- func GetPreviousPodLogs(c clientset.Interface, namespace, podName, containerName string) (string, error)
- func LogPodStates(pods []v1.Pod)
- func WaitForPodCondition(c clientset.Interface, ns, podName, desc string, timeout time.Duration, ...) error
- func WaitForPodNameRunningInNamespace(c clientset.Interface, podName, namespace string) error
- func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedNotReadyPods int32, ...) error
- func WaitTimeoutForPodRunningInNamespace(c clientset.Interface, podName, namespace string, timeout time.Duration) error
Constants ¶
const LabelLogOnPodFailure = "log-on-pod-failure"
LabelLogOnPodFailure can be used to mark which Pods will have their logs logged in the case of a test failure. By default, if there are no Pods with this label, only the first 5 Pods will have their logs fetched.
Variables ¶
This section is empty.
Functions ¶
func DumpAllPodInfoForNamespace ¶
DumpAllPodInfoForNamespace logs all pod information for a given namespace.
func GetPodLogs ¶
GetPodLogs returns the logs of the specified container (namespace/pod/container).
func GetPreviousPodLogs ¶
func GetPreviousPodLogs(c clientset.Interface, namespace, podName, containerName string) (string, error)
GetPreviousPodLogs returns the logs of the previous instance of the specified container (namespace/pod/container).
func LogPodStates ¶
LogPodStates logs basic info of provided pods for debugging.
func WaitForPodCondition ¶
func WaitForPodCondition(c clientset.Interface, ns, podName, desc string, timeout time.Duration, condition podCondition) error
WaitForPodCondition waits a pods to be matched to the given condition.
func WaitForPodNameRunningInNamespace ¶
WaitForPodNameRunningInNamespace waits default amount of time (PodStartTimeout) for the specified pod to become running. Returns an error if timeout occurs first, or pod goes in to failed state.
func WaitForPodsRunningReady ¶
func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods, allowedNotReadyPods int32, timeout time.Duration, ignoreLabels map[string]string) error
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. Also, it ensures that at least minPods are running and ready. It has separate behavior from other 'wait for' pods functions in that it requests the list of pods on every iteration. This is useful, for example, in cluster startup, because the number of pods increases while waiting. All pods that are in SUCCESS state are not counted.
If ignoreLabels is not empty, pods matching this selector are ignored.
If minPods or allowedNotReadyPods are -1, this method returns immediately without waiting.
Types ¶
This section is empty.