File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1406,6 +1406,7 @@ func TestBlueGreenReadyToScaleDownOldReplica(t *testing.T) {
1406
1406
f .objects = append (f .objects , r2 )
1407
1407
f .serviceLister = append (f .serviceLister , s )
1408
1408
1409
+ f .expectPatchReplicaSetAction (rs2 )
1409
1410
updatedRSIndex := f .expectUpdateReplicaSetAction (rs2 )
1410
1411
patchIndex := f .expectPatchRolloutAction (r2 )
1411
1412
f .run (getKey (r2 , t ))
Original file line number Diff line number Diff line change @@ -107,6 +107,16 @@ func (c *rolloutContext) removeScaleDownDeadlines() error {
107
107
toRemove = append (toRemove , c .stableRS )
108
108
}
109
109
}
110
+ for _ , rs := range c .otherRSs {
111
+ remainScaleDownDeadlines , err := replicasetutil .GetTimeRemainingBeforeScaleDownDeadline (rs )
112
+ if err != nil {
113
+ c .log .Warnf ("%v" , err )
114
+ continue
115
+ }
116
+ if replicasetutil .HasScaleDownDeadline (rs ) && remainScaleDownDeadlines == nil {
117
+ toRemove = append (toRemove , rs )
118
+ }
119
+ }
110
120
for _ , rs := range toRemove {
111
121
err := c .removeScaleDownDelay (rs )
112
122
if err != nil {
You can’t perform that action at this time.
0 commit comments