mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
kubelet: revert the get pod status
This commit is contained in:
parent
f88ff2ab41
commit
493f335830
@ -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
|
// GetPods returns all pods bound to the kubelet and their spec, and the mirror
|
||||||
// pods.
|
// pods.
|
||||||
func (kl *Kubelet) GetPods() []*v1.Pod {
|
func (kl *Kubelet) GetPods() []*v1.Pod {
|
||||||
pods := kl.podManager.GetPods()
|
return 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
|
// GetRunningPods returns all pods running on kubelet from looking at the
|
||||||
|
Loading…
Reference in New Issue
Block a user