controller: ensure deployment rollback is re-entrant
Make rollbacks re-entrant in the Deployment controller, otherwise fast enqueues of a Deployment may end up in undesired behavior - redundant rollbacks.
This commit is contained in:
@@ -650,6 +650,7 @@ func FindOldReplicaSets(deployment *extensions.Deployment, rsList []*extensions.
|
||||
if newRS != nil && rs.UID == newRS.UID {
|
||||
continue
|
||||
}
|
||||
// TODO: If there are no pods for a deployment, we will never return old replica sets....!
|
||||
allOldRSs[rs.ObjectMeta.Name] = rs
|
||||
if rsLabelsSelector.Matches(podLabelsSelector) {
|
||||
oldRSs[rs.ObjectMeta.Name] = rs
|
||||
|
Reference in New Issue
Block a user