Merge pull request #122475 from pacoxu/patch-9
fix nil pointer dereference when EventedPLEG is enabled
This commit is contained in:
		@@ -475,7 +475,7 @@ func (g *GenericPLEG) updateCache(ctx context.Context, pod *kubecontainer.Pod, p
 | 
				
			|||||||
	// Evented PLEG after the event has been received by the Kubelet.
 | 
						// Evented PLEG after the event has been received by the Kubelet.
 | 
				
			||||||
	// For more details refer to:
 | 
						// For more details refer to:
 | 
				
			||||||
	// https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/3386-kubelet-evented-pleg#timestamp-of-the-pod-status
 | 
						// https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/3386-kubelet-evented-pleg#timestamp-of-the-pod-status
 | 
				
			||||||
	if utilfeature.DefaultFeatureGate.Enabled(features.EventedPLEG) && isEventedPLEGInUse() {
 | 
						if utilfeature.DefaultFeatureGate.Enabled(features.EventedPLEG) && isEventedPLEGInUse() && status != nil {
 | 
				
			||||||
		timestamp = status.TimeStamp
 | 
							timestamp = status.TimeStamp
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user