Documentation
¶
Index ¶
- func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func GetPodReadyCondition(status *v1.PodStatus) *v1.PodCondition
- func IsPodAvailable(pod *v1.Pod, minReadySeconds int32, now metav1.Time) bool
- func IsPodCreated(pod *v1.Pod) bool
- func IsPodFailed(pod *v1.Pod) bool
- func IsPodHealthy(pod *v1.Pod) bool
- func IsPodPending(pod *v1.Pod) bool
- func IsPodReady(pod *v1.Pod) bool
- func IsPodRunningAndAvailable(pod *v1.Pod, minReadySeconds int32) bool
- func IsPodRunningAndReady(pod *v1.Pod) bool
- func IsPodSucceeded(pod *v1.Pod) bool
- func IsPodTerminating(pod *v1.Pod) bool
- func NextRevision(revisions []*appsv1.ControllerRevision) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPodCondition ¶
func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodConditionFromList ¶
func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.
func GetPodReadyCondition ¶
func GetPodReadyCondition(status *v1.PodStatus) *v1.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func IsPodAvailable ¶
IsPodAvailable returns true if a pod is available; false otherwise. Precondition for an available pod is that it must be ready. On top of that, there are two cases when a pod can be considered available: 1. minReadySeconds == 0, or 2. LastTransitionTime (is set) + minReadySeconds < current time
func IsPodCreated ¶
IsPodCreated returns true if pod has been created and is maintained by the API server
func IsPodFailed ¶
IsPodFailed returns true if pod has a Phase of PodFailed
func IsPodHealthy ¶
IsPodHealthy returns true if pod is running and ready and has not been terminated
func IsPodPending ¶
IsPodPending returns true if pod has a Phase of PodPending
func IsPodReady ¶
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodRunningAndReady ¶
IsPodRunningAndReady returns true if pod is in the PodRunning Phase, if it has a condition of PodReady.
func IsPodSucceeded ¶
IsPodSucceeded returns true if pod has a Phase of PodSucceeded
func IsPodTerminating ¶
IsPodTerminating returns true if pod's DeletionTimestamp has been set
func NextRevision ¶
func NextRevision(revisions []*appsv1.ControllerRevision) int64
NextRevision finds the next valid revision number based on revisions. If the length of revisions is 0 this is 1. Otherwise, it is 1 greater than the largest revision's Revision. This method assumes that revisions has been sorted by Revision.
Types ¶
This section is empty.