mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #122475 from pacoxu/patch-9
fix nil pointer dereference when EventedPLEG is enabled
This commit is contained in:
commit
0babde6bac
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user