mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
pod gc controller sets status.observedGeneration upon pod failure
This commit is contained in:
parent
40e7d88f02
commit
701b76f10d
@ -348,6 +348,7 @@ func (gcc *PodGCController) markFailedAndDeletePodWithCondition(ctx context.Cont
|
||||
if pod.Status.Phase != v1.PodSucceeded && pod.Status.Phase != v1.PodFailed {
|
||||
newStatus := pod.Status.DeepCopy()
|
||||
newStatus.Phase = v1.PodFailed
|
||||
newStatus.ObservedGeneration = apipod.GetPodObservedGenerationIfEnabled(pod)
|
||||
if condition != nil {
|
||||
apipod.UpdatePodCondition(newStatus, condition)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user