mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #127195 from yaojunyu/fix-pod-alway-restart-open-envetedpleg
EventedPLEG: Set Timestamp in PodStatus for Generic PLEG more accurate
This commit is contained in:
		@@ -1538,7 +1538,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubety
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	sandboxStatuses := []*runtimeapi.PodSandboxStatus{}
 | 
						sandboxStatuses := []*runtimeapi.PodSandboxStatus{}
 | 
				
			||||||
	containerStatuses := []*kubecontainer.Status{}
 | 
						containerStatuses := []*kubecontainer.Status{}
 | 
				
			||||||
	var timestamp time.Time
 | 
						timestamp := time.Now()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	podIPs := []string{}
 | 
						podIPs := []string{}
 | 
				
			||||||
	for idx, podSandboxID := range podSandboxIDs {
 | 
						for idx, podSandboxID := range podSandboxIDs {
 | 
				
			||||||
@@ -1582,7 +1582,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(ctx context.Context, uid kubety
 | 
				
			|||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				// Get the statuses of all containers visible to the pod and
 | 
									// Get the statuses of all containers visible to the pod and
 | 
				
			||||||
				// timestamp from sandboxStatus.
 | 
									// timestamp from sandboxStatus.
 | 
				
			||||||
				timestamp = time.Unix(resp.Timestamp, 0)
 | 
									timestamp = time.Unix(0, resp.Timestamp)
 | 
				
			||||||
				for _, cs := range resp.ContainersStatuses {
 | 
									for _, cs := range resp.ContainersStatuses {
 | 
				
			||||||
					cStatus := m.convertToKubeContainerStatus(cs)
 | 
										cStatus := m.convertToKubeContainerStatus(cs)
 | 
				
			||||||
					containerStatuses = append(containerStatuses, cStatus)
 | 
										containerStatuses = append(containerStatuses, cStatus)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user