fix: Regionalize all container images in UseRegionalImage() #8744
Merged
michaelhtm merged 2 commits intoMay 13, 2026
Conversation
UseRegionalImage() only processed Containers[0] and InitContainers[0], missing the aws-eks-nodeagent container introduced in VPC CNI v1.14.0. This caused the nodeagent image to retain the default us-west-2 ECR URI on clusters in other regions when using `eksctl utils update-aws-node`. Changes: - UseRegionalImage() now iterates over all containers and init containers - Added isRegionalImageFormat() guard to skip already-resolved URIs - UpdateAWSNode() sets the image format prefix for aws-eks-nodeagent by name before calling UseRegionalImage() - Added awsNodeAgentImageFormatPrefix constant
- Add image_test.go covering UseRegionalImage() with multiple containers, mixed format-string/resolved images, Chinese regions, and no init containers - Update aws_node_test.go to assert that Containers[1] (aws-eks-nodeagent) is correctly regionalized in both standard and Chinese region cases
7374696 to
2732252
Compare
michaelhtm
approved these changes
May 13, 2026
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.
Description
UseRegionalImage() only processed Containers[0] and InitContainers[0], missing the aws-eks-nodeagent container introduced in VPC CNI v1.14.0. This caused the nodeagent image to retain the default us-west-2 ECR URI on clusters in other regions when using
eksctl utils update-aws-node.Changes:
Testing
Unit tests
pkg/addons/image_test.gocoveringUseRegionalImage()with multiple containers, mixed format-string/resolved images, Chinese regions (.amazonaws.com.cnsuffix), and empty init container slices.pkg/addons/default/aws_node_test.goto assertContainers[1](aws-eks-nodeagent) is regionalized in both standard (us-east-1) and Chinese (cn-northwest-1) region test cases.Live cluster verification (eu-west-1)
regionalize-test) ineu-west-1with one self-managed node.vpc-cniaddon with--preserveto convert to self-managed VPC CNI.us-west-2:eksctl utils update-aws-node --cluster regionalize-test --region eu-west-1 --approvewith the patched binary.eu-west-1:2/2 Running— both containers pulling successfully from the correct regional ECR.Checklist
README.md, or theuserdocsdirectory)area/nodegroup) and kind (e.g.kind/improvement)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯