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

feature: support registry mirrors #2874

Merged

Conversation

zhuangqh
Copy link
Contributor

Signed-off-by: zhuangqh zhuangqhc@gmail.com

Ⅰ. Describe what this PR did

registryMirrors is a list of registry URLs that act as a mirror for the default registry.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

we need a new test framework to inject the deamon config.

Ⅳ. Describe how to verify it

# start pouchd with --registry-mirrors parameters
$ pouchd --registry-mirrors fake --registry-mirrors gcr.io

# pull a image without full reference
[root@pouch ~]# pouch pull cri-tools/hostnet-nginx:latest
gcr.io/cri-tools/hostnet-nginx:latest:                                            resolved       |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:d629efc3a5de1fe63bac3d877ed642968add1e795260b71a40802a3e9e3c5371: done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:c59fd35c9fab19f6db27c1aeb7f4d9fb8862c8fd9400104af66bc3e589ed0ee9:    done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:1e4531df184ea4708d9274d9dd8accf7352906c45cff67bdd276b68c87bfdea5:   done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:2a72cbf407d67c7a7a76dd48e432091678e297140dce050ad5eccad918a9f8d6:    done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:bce480ca577d3e311502bf1cc6192c72e2ec1d7d705ee905e9f1acf8f3c3ab10:    done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:fd4bd92a13906102906bdfb79dc15c6736f240338576b69b94f6a0078948d1d9:    done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 97.2s

Ⅴ. Special notes for reviews

registryMirrors is a list of registry URLs that
act as a mirror for the default registry

Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
@zhuangqh zhuangqh requested a review from fuweid May 29, 2019 06:48
@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #2874 into master will decrease coverage by 1.13%.
The diff coverage is 86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2874      +/-   ##
==========================================
- Coverage   69.09%   67.96%   -1.14%     
==========================================
  Files         285      285              
  Lines       17844    17887      +43     
==========================================
- Hits        12330    12157     -173     
- Misses       4114     4302     +188     
- Partials     1400     1428      +28
Flag Coverage Δ
#criv1alpha2_test 39.07% <68%> (+0.06%) ⬆️
#integration_test_0 36.64% <76%> (+0.06%) ⬆️
#integration_test_1 35.82% <64%> (+0.06%) ⬆️
#integration_test_2 36.58% <72%> (+0.11%) ⬆️
#integration_test_3 35.54% <86%> (+0.08%) ⬆️
#node_e2e_test ?
#unittest 28.45% <0%> (-0.09%) ⬇️
Impacted Files Coverage Δ
daemon/config/config.go 69.51% <ø> (ø) ⬆️
daemon/mgr/system.go 75.37% <100%> (+0.56%) ⬆️
ctrd/image.go 66.18% <75%> (-1.97%) ⬇️
daemon/mgr/image.go 61.2% <86.84%> (+1.75%) ⬆️
cri/stream/remotecommand/websocket.go 0% <0%> (-81.54%) ⬇️
cri/stream/remotecommand/exec.go 36.66% <0%> (-43.34%) ⬇️
cri/stream/remotecommand/errors.go 14.28% <0%> (-14.29%) ⬇️
cri/v1alpha2/cri.go 60.6% <0%> (-8.46%) ⬇️
cri/ocicni/netns.go 52.7% <0%> (-5.41%) ⬇️
daemon/logger/jsonfile/encode.go 78.26% <0%> (-3.27%) ⬇️
... and 12 more

@zhuangqh
Copy link
Contributor Author

link to #2875

Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants