-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
feat: Allow to choose launch template version for Managed Node Groups when create_launch_template
is set to true
#1419
feat: Allow to choose launch template version for Managed Node Groups when create_launch_template
is set to true
#1419
Conversation
Signed-off-by: Kevin Lefevre <[email protected]>
😢 In docs https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html it says:
|
create_launch_template
@barryib Do you see any issue with that ? For me when not using Create/Custom LT the only thing that is going to trigger an update if changing the label maybe and the version right ? |
modules/node_groups/node_groups.tf
Outdated
@@ -48,7 +48,7 @@ resource "aws_eks_node_group" "workers" { | |||
dynamic "launch_template" { | |||
for_each = each.value["launch_template_id"] == null && each.value["create_launch_template"] ? [{ | |||
id = aws_launch_template.workers[each.key].id | |||
version = aws_launch_template.workers[each.key].latest_version | |||
version = each.value["launch_template_version"] != null ? each.value["launch_template_version"] : aws_launch_template.workers[each.key].latest_version |
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 was just wondering how user will get the launch_template_version
if it's created directly by the module ? They have to go through the aws cli or aws console ?
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.
Yes I think they can see it in the TF or in cli/console. Most of the time if think you want to upgrade (that's one of the perk of MNG vs Self managed without instance refresh) but it might be useful when you have large pool and do not want to trigger an upgrade yet
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 just noticed that launch_template_version = "$Latest"
by default https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/local.tf#L104. In that case, should we need this ternary evaluation ?
Does version = each.value["launch_template_version"]
enough ?
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.
Yes it should be, fixed
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 was just saying that it is intended behavior ^^.
I think you're right. I don't use MNG at all (for now). |
create_launch_template
create_launch_template
is set to true
Signed-off-by: Kevin Lefevre <[email protected]>
Thanks @ArchiFleKs for your contribution. |
Just released it in v17.1.0 |
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. |
PR o'clock
Description
By default choose latest LT version. This trigger a rollout of all the instances. I noticed this because of the description change here
This PR allow to override launch template version to postpone instances rollout if needed
Checklist