Unverified Commit 116f06e9 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #77661 from mfpierre/fix-static-pods-kubelet-status

Kubelet status manager sync the status of local Pods
parents 5c4b6528 27cccad8
......@@ -162,7 +162,15 @@ func (kl *Kubelet) getPodResourcesDir() string {
// GetPods returns all pods bound to the kubelet and their spec, and the mirror
// pods.
func (kl *Kubelet) GetPods() []*v1.Pod {
return kl.podManager.GetPods()
pods := kl.podManager.GetPods()
// a kubelet running without apiserver requires an additional
// update of the static pod status. See #57106
for _, p := range pods {
if status, ok := kl.statusManager.GetPodStatus(p.UID); ok {
p.Status = status
}
}
return pods
}
// GetRunningPods returns all pods running on kubelet from looking at the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment