-
Notifications
You must be signed in to change notification settings - Fork 19
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
reuse logic-1 #38
reuse logic-1 #38
Conversation
controllers/appwrapper_controller.go
Outdated
// } | ||
scaleDown(aw) | ||
if reuse { | ||
if checkIfExactMatchExists(aw) { |
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.
Why does checkIfExactMatchExists()
return a bool "shouldScaleDown" if either way scaleDown()
is going to be called the same way? It seems like the "check" part of the function is unused, and it is more so just a means of doing label swapping if a match is found. Also the conditional here seems unnecessary. And for clarification, what exactly is the goal of "annotateToDeleteMachine"? I'm assuming it is to delete all machines for the scaling down AW that didn't have their labels swapped to a new pending AW? I could take a stab at restructuring/simplifying this scaling down portion if you'd like.
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.
Good points, If the exact match does not exist, we want to scale down. Machines in Machinesets need to be cherry-picked to be deleted.
Can you create an issue and add the restructuring you are planning to add?
@Maxusmusti I am merging this PR since it was testing on my fork |
No description provided.