-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix targeted scale-in logic #215
Fix targeted scale-in logic #215
Conversation
@unmarshall, @himanshu-kun You have pull request review open invite, please check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kindly avoid using flag
as it makes the code unreadable
also try to break the main code where you reset priorities into helper functions so its more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kindly avoid using flag
as it makes the code unreadable
also try to break the main code where you reset priorities into helper functions so its more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
What this PR does / why we need it:
This PR updates the priority of machines with nodes without
ToBeDeletedTaint
to3
before callingDeleteMachines
to scale down the corresponding machine deployment.Which issue(s) this PR fixes:
Fixes #159
Special notes for your reviewer:
This PR does not deal with one case of #159. It is as follows:-
At T1, CA marked [N2, N4] with ToBeDeleted taint, added priority=1, and reduced the machine deployment replicas by 2.
Then CA restarts, which calls
cleanUpIfRequired
, which removes all the taints and resets the priority of N2 and N4 to3
. By this point, if MCM has not started the deletion process, then it is possible that N2 and N4 are not selected for deletion because MCM selects machines to delete based on priority annotation value.Following test cases are added for the
DeleteNodes
method:-Following test cases are added for the
Refresh
method:-ToBeDeletedTaint
to3
.ToBeDeletedTaint
.The base cluster requirements for IT are updated.
The faking (for unit tests of mcm cloud provider implementation) is done for the client only. Listers are not faked
Release note: