-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support specifying host in resolver. #2450
Support specifying host in resolver. #2450
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2450 +/- ##
==========================================
+ Coverage 45.01% 45.04% +0.02%
==========================================
Files 92 92
Lines 9414 9424 +10
==========================================
+ Hits 4238 4245 +7
- Misses 4493 4496 +3
Partials 683 683
Continue to review full report at Codecov.
|
remotes/docker/resolver.go
Outdated
@@ -65,6 +66,9 @@ type ResolverOptions struct { | |||
// is interpretted as a long lived token. | |||
Credentials func(string) (string, string, error) | |||
|
|||
// Host is the hostname of the registry. | |||
Host string |
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.
Can we provide this as a function? A resolver is intended to handle multiple namespaces/hosts
We could have the docker.io
handling as a default function here
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.
Will do.
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.
How about this?
908e349
to
684dc87
Compare
Signed-off-by: Lantao Liu <lantaol@google.com>
684dc87
to
c8a8a49
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
LGTM |
This is very useful to implement high level policies like registry mirror. See containerd/cri#838
Signed-off-by: Lantao Liu lantaol@google.com