mirror of https://github.com/k3s-io/k3s
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
commit
cdecea5455
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue