-
Notifications
You must be signed in to change notification settings - Fork 967
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
Adds support for tags in aws provider spec #769
Conversation
✔️ Deploy Preview for karpenter-docs-prod canceled. 🔨 Explore the source changes: 57914da 🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/6178651675f93500079c444c |
We should note in the docs that these tags will not be applied if a custom launch template is used. |
57914da
KarpenterTagKeyFormat = "karpenter.sh/cluster/%s" | ||
) | ||
|
||
func ManagedTagsFor(clusterName string) map[string]string { |
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.
Consider attaching this method to the AWS struct.
AWS.GetTags() // includes both API specified tags as well as our decorated ones.
It might simplify your code a bit.
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.
I might also lean away from the term "managed" since it's such an overloaded concept.
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.
Spoke about this offline but I needed a way to separate out just our decorated tags. I wanted to compare the user's tags with our decorated ones prior to the merge so had to do it this way.
Agreed on the managed
bit. I thought about calling it something like karpenterTags or controllerAppliedTags but nothing felt any nicer so just stuck with managed for now.
Thanks for calling this out. |
1. Issue, if available:
#642
2. Description of changes:
3. Does this change impact docs?
Wasn't sure but I think this should be documented here? - https://github.com/awslabs/karpenter/blob/main/website/content/en/docs/cloud-providers/AWS.md ? I can edit this PR to include the doc changes if everything else looks good.
Testing done
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.