Scale-up only new machineSet while scale-down all active mSs proportionally #765
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR changes the scaling logic of machineDeployment.
#Before
a scale-up or scale-down lead to proportional splitting of the increase/decrease in replicas among the machineSets as per their size
#Now
a scale-up leads to increase in replicas of the new machineSet only, while scale-down leads to the same proportional scaling as before.
This is done keeping in mind working of autoscaler with MCM. Because during rolling update if autoscaler asked for a scale-up , it used to add machine to the old machineSet(s) during the initial phases of the rolling update. This was inefficient as that machine would be drained later leading to longer rolling update cycle.
Which issue(s) this PR fixes:
Fixes #754
Special notes for your reviewer:
The change is made keeping autoscaler interaction with MCM in mind. Corresponding PR on autoscaler is also raised, to stop autoscaler from scaling down during rolling update operations.
Release note: