Readypod optimization in executor (#1860)

A ready pod which can be specialized was fetched for every function earlier, this has been changed to a queue and cache implementation in client-go to improve performance.
This commit is contained in:
Rahul Bhati
2020-11-19 15:23:02 +05:30
committed by GitHub
parent aaf9f18d93
commit bb9f4136f5
8 changed files with 128 additions and 180 deletions
-9
View File
@@ -66,15 +66,6 @@ func IsReadyPod(pod *apiv1.Pod) bool {
return false
}
// pod is not in Running Phase. It can be in Pending,
// Succeeded, Failed, Unknown. In some cases the pod can be in
// different sate than Running, for example Kubernetes sets a
// pod to Termination while k8s waits for the grace period of
// the pod, even if all the containers are in Ready state.
if pod.Status.Phase != apiv1.PodRunning {
return false
}
// pod is in "Terminating" status if deletionTimestamp is not nil
// https://github.com/kubernetes/kubernetes/issues/61376
if pod.ObjectMeta.DeletionTimestamp != nil {