-
Notifications
You must be signed in to change notification settings - Fork 120
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
Inhibit scale-down by autoscaler during roll-outs. #496
Inhibit scale-down by autoscaler during roll-outs. #496
Conversation
Not really, nothing more elegant. That would have been also my approach/was also what I was thinking when I heard/read the above. |
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.
@hardikdr Thanks for the PR. Just a couple of questions/comments. Otherwise looks good, apart from tests.
Thanks for the reviews. |
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.
One more question. The PR covers only the RollingUpdate
strategy. Wouldn't the feature be complete if we cover the Recreate
strategy too?
Recreate strategy simply deletes all the existing machines and creates the new ones altogether. That is already super disruptive, not sure how autoscaler could harm it any further. |
What if CA scales down/up while the new machines are still joining? Isn't it better to cover all bases? |
d003f2c
to
1b48eaa
Compare
1b48eaa
to
44d70a2
Compare
I spent a bit more time and experimented. Basically, during
Overall,
In summary, I felt it definitely sounds sensible to cover all the strategies for the feature from bird's eye view, but there are more details. But if we see the value, I am more than happy to somehow make it work. :) |
3a557bb
to
b80203a
Compare
b80203a
to
e5a4f64
Compare
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.
Minor typo.
/lgtm otherwise
Also ditto comment on squashing commits.
ccde85d
to
527a25f
Compare
527a25f
to
0419c04
Compare
0419c04
to
f5a0478
Compare
@amshuman-kr @ggaurav10 Can you please take a final look and approve if possible? |
/ping |
Message
|
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: With this PR, during roll out of the machine-deployment, all the machines under it are annotated with
cluster-autoscaler.kubernetes.io/scale-down-disabled: "True"
.This will help us keeping the cluster-autoscaler running even during the cluster-rollouts. CA will not scale-down a specific machine-deployment which is being rolled, but will be able to scale-down the rest of them. Also, CA will be able to scale-up all the machine-deployments during roll-outs.
There are mainly 2 parts to the PR:
Adding the annotation during roll-out.
up-to-date
, andready
replicas as well here.Removing the annotation after the roll-out.
NodeTemplate
.by-mcm
annotation, which is added on the node along with the original annotation. This place-holder-annotation helps in deciding if the original annotation is added by mcm or by the user. This helps in avoiding potential race-condition withnodeTemplate
logic.Unfortunately, we cant use the
nodeTemplate
feature for adding/removing the annotation:nodeTemplate
, machine-deployment overwrites it back.nodeTemplate
, worker-controller will eventually overwrite it to the original state.Which issue(s) this PR fixes:
Fixes https://github.com/gardener/autoscaler/issues/48
FIxes #472
Special notes for your reviewer:
We need to consider the possibility that users might also be using the same annotation for their use cases. We should make sure, autoscaler annotations from users are maintained.
Release note: