mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	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 ```
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user