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

feat: Add ability for tagging AWS-generated ASGs when using managed node groups #1705

Closed
wants to merge 6 commits into from

Conversation

gabops
Copy link

@gabops gabops commented Nov 25, 2021

Description

  • Add ability for tagging AWS generated autoscaling groups when using managed node groups

Motivation and Context

  • This change comes from the personal need of having to have the ASGs tagged in a certain way for allowing cluster-autoscaler to add instances automatically when they are set initially to 0. However, this change also allows to tag the asgs in any other required case.

Breaking Changes

None as the module behaves the same when not using this functionality.

How Has This Been Tested?

The following scenarios have been tested over my personal AWS account:

  • ✅ Created cluster with node_groups containing asg_tags
  • ✅ Created cluster with node_groups not containing asg_tags
  • ✅ Removed tags from asg
  • ✅ Add back tags
  • ✅ Remove cluster that contains asg with tags
  • ✅ Remove node groups containing asg tags from cluster.

@gabops gabops marked this pull request as draft November 25, 2021 17:15
* Modify logic for asg managed node asg tagging for not crashing when the resource does not exist yet
* Remove forgotten logic from previous attempts
@gabops gabops marked this pull request as ready for review November 25, 2021 19:13
@gabops gabops marked this pull request as draft November 25, 2021 23:46
* Change logic to define asg tags by having to declare them in a list of dictionaries. This allows to be granular with the propagate_at_launch parameter.
@gabops gabops marked this pull request as ready for review November 26, 2021 10:47
* Iterate on over node_groups variable, otherwise it breaks as it does not wait for the node_groups_expanded variable

* Add conditional to loop in order to prevent error for being empty object when node_groups is removed/not used
@gabops gabops marked this pull request as ready for review December 10, 2021 15:28
@antonbabenko
Copy link
Member

This issue has been resolved in version 18.0.0 🎉

@weixcloud
Copy link

weixcloud commented Jan 17, 2022

@antonbabenko any doc for it? seems still not working in version 18.0.6. When I use the var tags, the autocaling group still doesn't have these tags.

@antonbabenko
Copy link
Member

@weixianearmap Please see the code in examples for more details, and open a separate issue (with complete details provided) if there is a bug or a problem.

@weixcloud
Copy link

@antonbabenko Sorry, I can't find any examples which has asg_tags demo in master branch. I don't think this pr has been merged. That's why I made the comment here.

@antonbabenko
Copy link
Member

This PR was not merged because the same functionality was introduced in #1680. You can search for tags in examples.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants