-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ability to disable a provisioner #2491
Comments
Why not delete the provisioner instead? |
Deleting the provisioner without the @grosser There are a couple of workarounds to enable "disabling" behavior without explicitly having the field surfaced in the Provisioner API:
requirements:
- key: "karpenter.sh/capacity-type"
operator: DoesNotExist |
none of these really work:
|
When you say "shutting down nodes", what do you mean? Are you referring to consolidation, emptiness of nodes, or expiration? |
all of them (but atm we don't plan on using expiration) |
So can you update the provisioner to have the additional requirement listed above along with ensuring that you do not have |
I'm also trying to get to root of the use-case here. What do you need the provisioner disabled for? My assumption is that you want to do debugging on the node and you don't want the provisioner to interfere. |
if there is for example an az outage or we have trouble with node bootstrap (new nodes cannot boot) we want to disable the provisioner (and everything it does) to have a stable environment also for blue-green rollouts we want to disable the old provisioner and slowly roll out a new one so it would be useful there too |
Can you explain the problems with this solution in your opinion? In this case, if you did this to your provisioner, no new nodes would launch and karpenter wouldn't delete any nodes for you on your behalf. The only caveat here is if you went about deleting the provisioner, the cascading deletion would still take effect but you probably shouldn't be doing this with an AZ outage or blue-green rollout anyways. |
yes it would be a workable workaround but:
|
Relevant to #2737 |
I think we likely need a more holistic solution to control different actions that karpenter takes, e.g.
|
Why not set limits to 0? This will stop provisioning, but not deprovisioning. |
Do you want this at the provisioner level or karpenter globally? It's likely that another provisioner will still work if you just disable one. |
I'd want to stop provisioning and de-provisioning. |
This is currently possible by modifying requirements to exclude the impacted AZ. |
would that make the az no longer scale-down either ? |
I'm not grokking the big picture that you're imagining. During an AZ outage, the node lifecycle controller will disable taint based eviction, so pods won't get evicted, the nodes won't become empty, and scale down shouldn't occur. |
during an az outage (or other problem in 1 az) we drain the nodes in that az from everything except pods with pvcs, but we keep the nodes around (we could delete the ones that get empty though) is there some annotation we could set to make karpenter not scale down certain nodes ? (would be useful for another usecase we have too, which is marking nodes as no-scale when they run long-running pods) and maybe set max so it does not scale up but overall this feels a bit hacky and I was hoping a "off switch" would be easier to use |
Highly recommend against this: https://github.com/aws/aws-eks-best-practices/pull/247/files?short_path=19e909f#diff-19e909fa40e2670b64ac33aa645bc59b7b2335cdad31d7d5070d8dddb5cefc70
You can always set the |
yeah good article, the way we drain is that we create copies first and only drain if these copies are healthy, so some of the gotchas don't apply a kind of |
Playing with this: kubernetes-sigs/karpenter#87 |
Hey @grosser, sorry for the delay, tackling this for provisioning and deprovisioning. Provisioning: The way that we do this in tests and in our clusters is by setting limits to 0. It won't cause any machines to scale down, but it won't allow any new machines to be scaled up from this provisioner. I'm going to close this as those are the ways we're planning on allowing users to effectively disable the core mechanisms of Karpenter without having to delete their Provisioners. |
thx, sounds godd
…On Wed, Aug 9, 2023 at 11:54 AM Nick Tran ***@***.***> wrote:
Closed aws/karpenter-provider-aws#2491 <#2491> as completed.
—
Reply to this email directly, view it on GitHub
<#2491 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACYZ2I232MX4BRDHJRUHLXUPMHPANCNFSM6AAAAAAQKUHT3M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Tell us about your request
when something goes wrong during node bootstrap I want to be able to disable the provisioner so they do not add or remove nodes
Are you currently working around this issue?
No
Community Note
The text was updated successfully, but these errors were encountered: