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

version-checker throws "failed to describe images" error when version-checker and ECR repository are in different region #146

Closed
hfarooqui opened this issue Jan 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hfarooqui
Copy link

Issue
version-checker application runs as part of EKS cluster in eu-central-1 region. The ECR repository that it tries to get the tags from located in a seperate AWS account in us-west-2 region. With this setup, following error is seen in the version-checker logs:

time="2024-01-09T17:54:56Z" level=error msg="error syncing 'argus-publisher-387p426c44-n5pwl/lz': failed to sync pod argus-publisher-387p426c44-n5pwl/lz: failed to check container image \"argus-metrics\": failed to get tags from remote registry for \"1484434948134dkr.ecr.us-west-2.amazonaws.com/custom/argus-metrics\": failed to describe images: AccessDeniedException: User: arn:aws:sts::607038281239:assumed-role/de2-fra5-zpa-eks-version-checker/1704822283073328680 is not authorized to perform: ecr:DescribeImages on resource: arn:aws:ecr:eu-central-1:1484434948134dkr:repository/custom/argus-metrics because no resource-based policy allows the ecr:DescribeImages action\n\tstatus code: 400, request id: a28df8d3-b5cf-482b-ba79-3c318296b203, requeuing" module=controller

As seen in the above error the ECR arn is incorrectly refrenced as arn:aws:ecr:eu-central-1:1484434948134dkr:repository/custom/argus-metrics instead of arn:aws:ecr:us-west-2:1484434948134dkr:repository/custom/argus-metrics

Ref: https://github.com/jetstack/version-checker/blob/main/pkg/client/ecr/ecr.go#L42-L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants