host-ctr: use user-provided reg creds for 'public.ecr.aws' #2676
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.
Issue number:
Resolves #2671
Description of changes:
Testing done:
Validated by @ahreehong and @vignesh-goutham.
To summarize:
On
vmware-k8s-1.23
, specified a private registry mirror forpublic.ecr.aws
and specified registry creds for the registry mirror.host-ctr
is able to pull images from the registry mirror at198.18.34.118
and start host containers and bootstrap containers.There is a separate issue we discovered as part of this validation.
cri-containerd
requires the registry creds to be set for the registry mirror itself (198.18.34.118
) and not the destination registry host (public.ecr.aws
in this case). There needs to be a follow-up fix to alignhost-ctr
's way of constructing the image resolver withcri-containerd
's. See #2677 for more info.This PR is still valid on it's own regardless; Users might still want to be able to get public ECR creds themselves and pass it manually through
settings.container-registry.credentials
forpublic.ecr.aws
.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.