mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
pod gc controller sets status.observedGeneration upon pod failure
This commit is contained in:
@@ -348,6 +348,7 @@ func (gcc *PodGCController) markFailedAndDeletePodWithCondition(ctx context.Cont
|
|||||||
if pod.Status.Phase != v1.PodSucceeded && pod.Status.Phase != v1.PodFailed {
|
if pod.Status.Phase != v1.PodSucceeded && pod.Status.Phase != v1.PodFailed {
|
||||||
newStatus := pod.Status.DeepCopy()
|
newStatus := pod.Status.DeepCopy()
|
||||||
newStatus.Phase = v1.PodFailed
|
newStatus.Phase = v1.PodFailed
|
||||||
|
newStatus.ObservedGeneration = apipod.GetPodObservedGenerationIfEnabled(pod)
|
||||||
if condition != nil {
|
if condition != nil {
|
||||||
apipod.UpdatePodCondition(newStatus, condition)
|
apipod.UpdatePodCondition(newStatus, condition)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user