Merge pull request #59948 from JulienBalestra/revert-kubelet-pod-status

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet: revert the get pod with updated status

**What this PR does / why we need it**:

Following #59892 this PR finish to revert #57106 

The first revert didn't solve the reboot test in the [test grid](https://k8s-testgrid.appspot.com/google-gce#gci-gce-reboot).


**Special notes for your reviewer**:

cc @dashpole  @Random-Liu 

**Release note**:
```release-note
None
```
pull/6/head
Kubernetes Submit Queue 2018-02-15 14:51:53 -08:00 committed by GitHub
commit cdecea5455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -142,15 +142,7 @@ func (kl *Kubelet) getPodContainerDir(podUID types.UID, ctrName string) string {
// GetPods returns all pods bound to the kubelet and their spec, and the mirror
// pods.
func (kl *Kubelet) GetPods() []*v1.Pod {
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
return kl.podManager.GetPods()
}
// GetRunningPods returns all pods running on kubelet from looking at the