-
-
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
fix: Fixed launch template version infinite plan issue and improved rolling updates #1447
fix: Fixed launch template version infinite plan issue and improved rolling updates #1447
Conversation
Not sure what is the pre-commit check complaining about why the check is asking me to change
with
when that part is aligned with above resource |
I'm pretty sure the CI error is due to this becasue teraform-docs file are extracted in the working folder and there is LICENSE file messing up the CI. I had the same issue on some of my repo. I'll make a PR if there is not one already |
Any way I can help with getting this merged @barryib ? |
What is blocking this PR merge? The "$Latest" thing is causing unnecessary 'drift' notifications in our terraform plans. Unfortunately, the launch template is not exported from the module as an output, so I can't fetch its latestVersion property. Needs to be fixed in the module. Or, I could hard code the current value of the launch template version, but worried it might miss updates. |
Looks like main maintainer is just away this week Edit: this month*? |
Any updates on this? I'm more then happy to help in any way to get this merged |
I have tested and validated that this change works as expected. I can post the plan changes of with / without the fix to compare the difference if need be |
Any updates on this PR? |
@jaimehrubiks I'm more then happy to take over this change if you don't have time |
@Chili-Man this PR is fully functional. I am actually using it right now. We are only waiting for a maintainer of this repository to review, accept all the pending PRs, and make a release. @barryib was the one doing it for a very long time, but he is currently missing. |
@jaimehrubiks indeed it is functional, I'm using your changes as well; however, this PR is currently failing the |
I also faced this issue. It would be great if it was merged. |
Just hit this as well as #1461. Had to fork the base repo, and everything now works beautifully. Hope this gets merged soon. |
@Chili-Man the fmt fails because of line 51 in that file |
The v17.1.0 have an issue(terraform-aws-modules/terraform-aws-eks#1446) where each plan will have a change for the templates, this cause our divergence pipeline fail" # Pinned the version until this fix get merged terraform-aws-modules/terraform-aws-eks#1447
The v17.1.0 have an issue(terraform-aws-modules/terraform-aws-eks#1446) where each plan will have a change for the templates, this cause our divergence pipeline fail" Pinned the version until this fix get merged terraform-aws-modules/terraform-aws-eks#1447
* Pin launch_template_version for EKS module The v17.1.0 have an issue(terraform-aws-modules/terraform-aws-eks#1446) where each plan will have a change for the templates, this cause our divergence pipeline fail" Pinned the version until this fix get merged terraform-aws-modules/terraform-aws-eks#1447
It seems like this repository may need more maintainers, it has not had any new changes accepted for almost two months. @barryib @bryantbiggs @brandonjbjelland @antonbabenko Are you guys open to adding more maintainers to this project? |
hi all, I haven't had time to test this but - does this introduce any breaking changes? does anyone have a plan/diff they could share for this change against |
No, there are no breaking changes. And there are no plan/diffs because the actual result of this PR is to prevent a diff from happening when no changes are made to the code. |
@bryantbiggs I've been using the latest version of module with this patch applied and had no issues with it. Infinite update is no longer present on no-changes plans, and managed node groups launch templates version updates are working as expected. |
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.
change seems small enough and seems to jive with what we've seen on ASG module - @antonbabenko / @barryib 👍🏼
This MR appears to be ready to go and has two approvals. Any particular reason we are waiting on it? |
@andreyBar it seems it is the terraform-docs README, but there is also some fmt to do on the code. I've made a very small PR here #1541 to only extract the binary |
@jaimehrubiks once we merge #1541, could you rebase with |
@bryantbiggs I did the fix myself to release a bit quicker. |
v17.3.0 has been just released. |
Thanks @antonbabenko |
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
Resolves #1446
Description
The recent PR (#1419) added support to set the launch template version on auto-generated launch templates for managed node groups, with the purpose of delaying rolling updates. However, it adds a bug caused by setting "$Latest" as the parameter to the node groups API call, which causes a never settled terraform plan, as the $Latest (or $Default) string is accepted by the API but translated into the corresponding integer afterwards. Read here: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group#version
This PR fixes this issue and sets the corresponding integer directly. When the user specifies either "$Latest" or "$Default" on the "launch_template_version" variable, the module will now resolve the corresponding version number as an integer and use that value instead.
This PR also adds the variable "update_default_version" which will allow delaying the rolling update without knowing a specific version number.
How to delay a Rolling Update?
Using the default values:
We achieve: 1) Always use the latest changes on the launch template, 2) Push the $Default tag to the latest version
Whenever we need to delay the rolling update, we can simply set:
And when we apply, only the launch template will be changed, but not the node groups, as they will reference to the old "default" which was the last time when update_default_version was set to true
When we revert those changes, the node groups will be updated.
Also, by setting:
In all cases, will achieve the same result and we only need to play with update_default_version variable
Note that you cant make it such that "new instances use the new launch template but we don't roll update the old one". You can, however, delay the rolling update as stated above, and try if the new version is working by manually going to the AWS cli and creating a new VM out of the launch template version desired (the latest number for example).