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

Support specifying host in resolver. #2450

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

Random-Liu
Copy link
Member

This is very useful to implement high level policies like registry mirror. See containerd/cri#838

Signed-off-by: Lantao Liu lantaol@google.com

@codecov-io
Copy link

codecov-io commented Jul 9, 2018

Codecov Report

Merging #2450 into master will increase coverage by 0.02%.
The diff coverage is 73.68%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#linux 49.29% <75%> (+0.04%) ⬆️
#windows 41.33% <73.68%> (+0.03%) ⬆️
Impacted Files Coverage Δ
remotes/docker/resolver.go 61.33% <73.68%> (+0.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01d309e...c8a8a49. Read the comment docs.

@@ -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
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

Signed-off-by: Lantao Liu <lantaol@google.com>
Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmcgowan
Copy link
Member

LGTM

@dmcgowan dmcgowan merged commit b382b6f into containerd:master Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants