Repository navigation
eks: hold the managed-AMI and general node groups on their launch-template version - #882
Merged
the-gigi-pplx merged 1 commit intoOct 23, 2026
Conversation
the-gigi-pplx
force-pushed
the
gigi/pla-6882-hold-general-cred-authority-launch-template
branch
9 times, most recently
from
October 22, 2026 23:15
ba17c08 to
da03c16
Compare
the-gigi-pplx
marked this pull request as ready for review
October 23, 2026 00:33
the-gigi-pplx
force-pushed
the
gigi/pla-6882-hold-general-cred-authority-launch-template
branch
2 times, most recently
from
October 23, 2026 02:02
f483f7a to
569c137
Compare
the-gigi-pplx
force-pushed
the
gigi/pla-6882-hold-general-cred-authority-launch-template
branch
from
October 23, 2026 03:00
569c137 to
f3e6ca9
Compare
nikhilgupta-pplx
approved these changes
Oct 23, 2026
nikhilgupta-pplx
left a comment
Member
There was a problem hiding this comment.
LGTM at f3e6ca9.
launch_template[0].versionhold onmanaged,general_blue_greenandgeneral_per_azmatches the existingrollout_managed/rollout-mngpattern. The template ID stays tracked, so a new template still forces replacement instead of pointing at a deleted template.- Custom-AMI groups (
aws_eks_node_group.custom) still track latest, so builder AMI rolls are unchanged. - Both
checkblocks resolve:managediterates only groups that exist (template-only pools are excluded),launch_templates["general"]always exists inmodules/space,general-2can't collide with thegeneral-<zone>keys, andtostring(latest_version)matches the stringversionthe provider refreshes afterupdate-nodegroup-version. - Dropping the "keep min/max out of an apply that also rolls the group" note is correct. With
version/release_versionunset and the template version held, Terraform no longer rolls these groups in place.
Before rollout, not blocking: the first apply drops any template roll currently pending on these groups. A group that needs a recent SG or metadata change, e.g. a changed credential_service_client_security_group_id on cred-authority, has to be moved explicitly. The rollback note covers the reverse case: reverting rolls every held group in parallel.
CI is green.
the-gigi-pplx
deleted the
gigi/pla-6882-hold-general-cred-authority-launch-template
branch
October 23, 2026 22:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EKS-managed-AMI node groups now stay on their launch-template version when the template changes. Before this change, any edit that produced a new template version rolled them in place. That covers the
eks-clustermodule's managed-AMI pools (general,cred-authority, andbuilderswhen no builders AMI is set or resolved, inmodules/space;generalin the reference cluster) plusmodules/space'sgeneral-2and per-AZ general groups. This addslaunch_template[0].versiontolifecycle.ignore_changesonaws_eks_node_group.managed,aws_eks_node_group.general_blue_greenandaws_eks_node_group.general_per_az.Every change to what a template launches with bumps its version, including a tag change in
common_tags, which the templates copy into their tag specifications. EKS's managed rolling update fails a node whose pods haven't left within about 15 minutes, withPodEvictionFailure. So a general pool running pods with a long termination grace period can't roll in place, and a cluster-wide tag change would fail the roll on every such pool. Therollout-mngmodule and the legacy rollout-managed worker group (aws_eks_node_group.rollout_managedinmodules/space/node_groups.tf) already hold their templates, because an in-place roll of their workers takes hours to days.ignore_changescan't be conditional, so this applies to every caller of these modules. A group still starts on the template's latest version. After that it moves only deliberately, through either path the new comments document:general-2or the per-AZ groups. A parked pool that has fallen behind is emptied, checked to run no instances immediately before the apply, and then recreated withterraform apply -replace, which brings it back on the latest version, before it starts serving.aws eks update-nodegroup-version --launch-template id=<id>,version=<version>, for a group whose pods all leave within EKS's eviction window.--forceisn't a way pastPodEvictionFailurefor the others: it deletes their pods regardless of disruption budgets. Passing the group's current--kubernetes-versionand--release-versionkeeps the call from also upgrading its AMI and Kubernetes version.The next refresh records the version the group runs, so neither path leaves drift. Until a group is moved, a
checkblock in each module warns about the groups that run an older template version than the latest:managed_node_groups_on_latest_launch_templateineks-clusterandgeneral_node_groups_on_latest_launch_templateinspace. It's a warning, so it doesn't fail the plan. The plan that changes a template can't name the groups yet, since the new version isn't known until apply; the apply and every later plan do. The template ID isn't held: EKS can't move a group to another template, so a new ID still plans the group's replacement rather than leaving it on a deleted template.Custom-AMI groups (
aws_eks_node_group.custom, which holdsbuilderswhenever a builders AMI is set) keep tracking the latest version, so an AMI change still rolls them.worker_capacityis unchanged. The cluster-autoscaler balancing comment now says general groups can stay on different template versions.reference/README.mdnow says the reference cluster'sgeneralpool doesn't follow its launch template, and gives the command that moves it.Validation
terraform fmt -check -recursive infraterraform validateoneks/modules/eks-cluster,eks/modules/space,eks/modules/controllers,eks/modules/eks-cluster/examples/minimalandreference/clustertflintoneks/modules/eks-cluster,eks/modules/space,eks/modules/controllersandreference/clusterterraform testagainst a copy ofeks-clusterwith mocked providers (not added to the repository). A new group starts on the template's latest version. A template change, modeled by recreating the template under the same ID with a higherlatest_version, leaves the group on its old version and raises the check's warning. Replacing the group brings it to the latest version, with no warning. With the hold removed, the second case fails because the group moves to the new version.No plan against a live cluster was run here. The change adds an ignored attribute, two
checkblocks and no resources, so an existing group's plan loses any pending launch-template roll and gains a warning while the group is behind.Severity and risk
Severity: medium. Without it, any change that bumps the shared tags rolls every general pool in place, and on a pool with long-draining pods that roll fails partway.
Risk: a held group keeps launching nodes from its old template version until someone rolls it. It also stops picking up new AMIs as a side effect: the provider's template roll sent no Kubernetes or AMI version, so it could also move these groups to the cluster's Kubernetes version and its newest AMI. Now only
update-nodegroup-versiondoes that. A template change that a group needs, such as a new security group, metadata option or disk size, doesn't reach it on apply. That includes a newcredential_service_client_security_group_idforcred-authority, whose description now says so. Amodules/spacecaller that runs builders on the EKS-managed AMI (no builders AMI set or resolved) puts builders in the held resource too. Rollback: revert this change. The next apply then rolls every held group whose recorded version is behind the template, in parallel, which can also move it to the cluster's Kubernetes version and its newest AMI. On a pool with slow-draining pods that roll fails the same way this change avoids, so move those pools onto the latest version first.AI assistance: Claude Code drafted the change and this description.