Retry pod choose if we get terminated or deleted pod from ready pod controller (#2274)

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2021-12-10 13:45:44 +05:30
committed by GitHub
parent fe0c1e3683
commit 35a5397a05
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -48,6 +48,13 @@ func IsReadyPod(pod *v1.Pod) bool {
return true
}
func IsPodTerminated(pod *v1.Pod) bool {
if phase := pod.Status.Phase; phase != v1.PodPending && phase != v1.PodRunning && phase != v1.PodUnknown {
return true
}
return false
}
// PodContainerReadyStatus returns the number of ready containers and total containers present in pod
func PodContainerReadyStatus(pod *v1.Pod) (readyContainers, noOfContainers int) {