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

Mismatch in logic for ecr cached images #1823

Open
mebays opened this issue May 29, 2024 · 0 comments
Open

Mismatch in logic for ecr cached images #1823

mebays opened this issue May 29, 2024 · 0 comments

Comments

@mebays
Copy link
Contributor

mebays commented May 29, 2024

What happened: Trying to build in the gov cloud region is was noticed that the BINARY_BUCKET_REGION is being used to assume the region of ecr when utilizing cached images.

According to the documentation the IAM policy to build the nodes should have the same region you are building the AMI in. reference

In the install-worker.sh this ends up passing the BINARY_BUCKET_REGION which defaults to the us-west-2 location. This allows to point to some other bucket in any region to pull the binaries which should be acceptable.

However it should not be assumed that the BINARY_BUCKET_REGION is the region to pull from ecr. It is also noticed the eks addons do not pass a region, so the assumption is this would query the region the AMI is being built for the addons which should probably match the ECR location to pull from.

What you expected to happen: I would expect when using the cached images it would query the region from the meta-data for the ecr-uri in order for the policy that states to use the same region for the AMI could succeed.

How to reproduce it (as minimally and precisely as possible): Build in a different region and use a policy that does not allow it to pull from us-west-2.

Environment:

  • AWS Region: us-gov-east-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant