-
Notifications
You must be signed in to change notification settings - Fork 319
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
Handle private ECR image references containing public.ecr.aws #667
Handle private ECR image references containing public.ecr.aws #667
Conversation
This issue is currently awaiting triage. If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign mmerkes |
@cartermckinnon: GitHub didn't allow me to assign the following users: mmerkes. Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@mmerkes please review? |
/assign tzneal |
@@ -162,10 +153,15 @@ func (e *ecrPlugin) GetCredentials(ctx context.Context, image string, args []str | |||
var creds *credsData | |||
var err error | |||
|
|||
if strings.Contains(image, ecrPublicURL) { |
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.
This is the bug.
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.
Overall, the change LGTM. What testing did you do on this? At a minimum, we should verify that this can pull a public and private image.
I sanity checked this with the log output:
|
6baea7c
to
b5857ae
Compare
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.
LGTM
@mmerkes: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @nckturner can you give this a look Nick? |
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.
/lgtm
@dims PTAL? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, mmerkes, tzneal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
hey @cartermckinnon we ran into this issue quite recently, super nice to see the fix merged in already 🎉 - do you have an idea on the cadence/ETA that the |
…#667-upstream-release-1.28 Automated cherry pick of #667: Handle private ECR image references containing public.ecr.aws
What type of PR is this?
/kind bug
What this PR does / why we need it:
When support was added for
public.ecr.aws
images, a simplestring.Contains
was used to determine whether a requested image reference was a private or public ECR repository. If you usepublic.ecr.aws
anywhere in your image reference, such as:Then public ECR creds will be retrieved, and image pulls will fail (or you'll fail to call
ecr-public::GetAuthorizationToken
if your IAM creds don't have permissions for it).Which issue(s) this PR fixes:
Fixes #651
Special notes for your reviewer:
I did some cleanup while I was at it:
RegistryIds
parameter toGetAuthorizationTokenInput
. This field is deprecated and has no effect on the token returned.Does this PR introduce a user-facing change?: