mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Check observed generation only after rs template is labeled in addHashKeyToRSAndPods
This commit is contained in:
parent
1d1c6f19b4
commit
020ab8813d
@ -190,11 +190,11 @@ func addHashKeyToRSAndPods(deployment extensions.Deployment, c clientset.Interfa
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error updating rs %s pod template label with template hash: %v", updatedRS.Name, err)
|
return nil, fmt.Errorf("error updating rs %s pod template label with template hash: %v", updatedRS.Name, err)
|
||||||
}
|
}
|
||||||
}
|
// Make sure rs pod template is updated so that it won't create pods without the new label (orphaned pods).
|
||||||
// Make sure rs pod template is updated so that it won't create pods without the new label (orphaned pods).
|
if updatedRS.Generation > updatedRS.Status.ObservedGeneration {
|
||||||
if updatedRS.Generation > updatedRS.Status.ObservedGeneration {
|
if err = waitForReplicaSetUpdated(c, updatedRS.Generation, namespace, rs.Name); err != nil {
|
||||||
if err = waitForReplicaSetUpdated(c, updatedRS.Generation, namespace, rs.Name); err != nil {
|
return nil, fmt.Errorf("error waiting for rs %s generation %d observed by controller: %v", updatedRS.Name, updatedRS.Generation, err)
|
||||||
return nil, fmt.Errorf("error waiting for rs %s generation %d observed by controller: %v", updatedRS.Name, updatedRS.Generation, err)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user