Skip to content

Commit

Permalink
fix rollout stuck in Progressing
Browse files Browse the repository at this point in the history
Signed-off-by: joey <[email protected]>
  • Loading branch information
chengjoey committed Jan 25, 2025
1 parent c10bf66 commit 449365b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions rollout/bluegreen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,7 @@ func TestBlueGreenReadyToScaleDownOldReplica(t *testing.T) {
f.objects = append(f.objects, r2)
f.serviceLister = append(f.serviceLister, s)

f.expectPatchReplicaSetAction(rs2)
updatedRSIndex := f.expectUpdateReplicaSetAction(rs2)
patchIndex := f.expectPatchRolloutAction(r2)
f.run(getKey(r2, t))
Expand Down
10 changes: 10 additions & 0 deletions rollout/replicaset.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ func (c *rolloutContext) removeScaleDownDeadlines() error {
toRemove = append(toRemove, c.stableRS)
}
}
for _, rs := range c.otherRSs {
remainScaleDownDeadlines, err := replicasetutil.GetTimeRemainingBeforeScaleDownDeadline(rs)
if err != nil {
c.log.Warnf("%v", err)
continue
}
if replicasetutil.HasScaleDownDeadline(rs) && remainScaleDownDeadlines == nil {
toRemove = append(toRemove, rs)
}
}
for _, rs := range toRemove {
err := c.removeScaleDownDelay(rs)
if err != nil {
Expand Down

0 comments on commit 449365b

Please sign in to comment.