File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,14 @@ func (c *rolloutContext) reconcileNewReplicaSet() (bool, error) {
160
160
}
161
161
} else if abortScaleDownDelaySeconds != nil {
162
162
// Don't annotate until need to ensure the stable RS is fully scaled
163
- if c .stableRS .Status .AvailableReplicas == * c .rollout .Spec .Replicas {
163
+
164
+ // We only perform this check if we had something to do with scaling down the stable RS.
165
+ // That is, when dynamicStableScale is used. Otherwise, we shouldn't wait for
166
+ // it to be the case. Since external influences (cluster autoscalers with their disruptions)
167
+ // may prevent the stable rs of becoming fully available for a while, irrelevant to us.
168
+
169
+ usesDynamicStableScaling := c .rollout .Spec .Strategy .Canary != nil && c .rollout .Spec .Strategy .Canary .DynamicStableScale
170
+ if c .stableRS .Status .AvailableReplicas == * c .rollout .Spec .Replicas || ! usesDynamicStableScaling {
164
171
err = c .addScaleDownDelay (c .newRS , * abortScaleDownDelaySeconds )
165
172
if err != nil {
166
173
return false , err
You can’t perform that action at this time.
0 commit comments