-
Notifications
You must be signed in to change notification settings - Fork 519
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
host-ctr: setting img reg credentials for public.ecr.aws
does not work
#2671
Comments
public.ecr.aws
does not work when using private reg mirrorpublic.ecr.aws
does not work
The issue here is that we're overriding the registry authorizer with credentials fetched from ECR public to enable authenticated pulls so users won't hit anonymous pull limits. bottlerocket/sources/host-ctr/cmd/host-ctr/main.go Lines 1037 to 1039 in d2a0371
custome authorizer object created here:bottlerocket/sources/host-ctr/cmd/host-ctr/main.go Lines 1063 to 1074 in d2a0371
Then used here through bottlerocket/sources/host-ctr/cmd/host-ctr/registry.go Lines 88 to 108 in d2a0371
What we want to do is to NOT override the authorizer if there is a We can add a
and just return the defaultResolver if it contains public.ecr.aws .
|
Image I'm using:
Any bottlerocket image supporting
settings.container-registry.mirrors
andsettings.container-registry.credentials
What I expected to happen:
host-ctr
to use the provided registry credentials insettings.container-registry.credentials
forpublic.ecr.aws
when going through a configured private registry mirror.What actually happened:
host-ctr
tries to pull the public ECR image from through the prescribed registry mirror but without the specified registry credentials forpublic.aws.ecr
which then causes the image pull to fail.How to reproduce the problem:
With the following user-data:
Bottlerocket then repeatedly fails to pull
bottlerocket-admin
host container image from public ECR due to authentication failures.The text was updated successfully, but these errors were encountered: