Skip to content
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

Add support for tags on AWS managed nodegroups to indicate resources #5596

Conversation

tbalzer
Copy link
Contributor

@tbalzer tbalzer commented Mar 15, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR introduces a feature that allows handling of ephemeral storage and custom resources in a scale-from-zero scenario when using EKS nodegroups.

It does this via allowing tags in the form of k8s.io/cluster-autoscaler/resources/<resource>: <quantity> analogous to how they are allowed directly on an ASG.
As the EKS-managed ASGs in case of managed nodegroups don't support custom tags for those resources they will be read from the managed nodegroup and processed accordingly.

Which issue(s) this PR fixes:

NONE

Special notes for your reviewer:

I have modeled this after the implementation for ASGs and tried to be as clean as possible, passing through the Tags in the managed node group cache. I don't expect anybody will find it unexpected that these specific annotations influence the node templates.

As for documentation regarding this I didn't immediately find a place where one could mention that the ASG annotations also work for managed nodegroups, however I initially just assumed they would until I looked at the code.

Does this PR introduce a user-facing change?

Allow k8s.io/cluster-autoscaler/resources/<resource>:<quantity> tags on AWS managed nodegroups (in addition to ASGs) to indicate availability of custom resources or ephemeral storage in a scale-from-zero scenario

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 15, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 15, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tbalzer / name: Tim Balzer (fb32b84)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 15, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @tbalzer!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 15, 2023
@tbalzer
Copy link
Contributor Author

tbalzer commented Mar 17, 2023

Hi @jaypipes @drmorr0,

Any chance to get a review on this? We're willing to contribute more time into this as needed, as this missing feature prevented us from using scale-from-zero when having pending pods with ephemeral-storage requests on AWS with managed nodegroups and we think that's a perfectly valid usecase that's missing after the support for Labels/Taints being extracted from managed nodegroups in a scale-from-zero scenario.

Currently we're running our clusters with our self-hosted cluster-autoscaler image that has this included, but would obviously prefer to be able to use upstream again. So far I can say it's worked flawlessly.

Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tbalzer thanks for this :) Left a couple questions/suggestions inline for you but I think the code makes sense.

@tbalzer tbalzer force-pushed the aws-mng-ephemeral-storage-scale-from-zero branch from fb32b84 to 53d55dc Compare March 22, 2023 20:07
@tbalzer
Copy link
Contributor Author

tbalzer commented Mar 22, 2023

@jaypipes : Thanks for the feedback and attention. I've updated the code according to your suggestions and replaced the commit. PTAL again.

Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm happy with this. Thank you @tbalzer for your work! :)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaypipes, tbalzer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 23, 2023
@tbalzer
Copy link
Contributor Author

tbalzer commented Mar 27, 2023

@jaypipes : Can you also add an lgtm here or should I ping someone else for this?

@jaypipes
Copy link
Contributor

@jaypipes : Can you also add an lgtm here or should I ping someone else for this?

@tbalzer I'd prefer another approver have a quick look. @gjtempleton can you have a quick looksie? Thanks!

@gjtempleton
Copy link
Member

/assign @gjtempleton

@tbalzer tbalzer force-pushed the aws-mng-ephemeral-storage-scale-from-zero branch from 53d55dc to 3ab6ead Compare April 24, 2023 16:28
@tbalzer
Copy link
Contributor Author

tbalzer commented Apr 24, 2023

@gjtempleton : Any chance to get a review? This is getting more and more stale.

@gjtempleton
Copy link
Member

@tbalzer apologies, I'll give this a review this week.

@gjtempleton
Copy link
Member

Thanks for this.

/lgtm

k8s-ci-robot added a commit that referenced this pull request Nov 2, 2023
…scaler-1.26

Backport #5596 [CA] AWS - Add support for tags on AWS managed nodegroups to indicate resources into CA 1.26
k8s-ci-robot added a commit that referenced this pull request Nov 2, 2023
…scaler-1.27

Backport #5596 [CA] AWS - Add support for tags on AWS managed nodegroups to indicate resources into CA 1.27
k8s-ci-robot added a commit that referenced this pull request Nov 2, 2023
…r-autoscaler-1.25

Backport #5285 & #5596 [CA] AWS - add nodegroup name to default labels & Add support for tags on AWS managed nodegroups to indicate resources into CA 1.25
k8s-ci-robot added a commit that referenced this pull request Nov 2, 2023
…r-autoscaler-1.24

Backport #5285 & #5596 [CA] AWS - add nodegroup name to default labels & Add support for tags on AWS managed nodegroups to indicate resources into CA 1.24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants