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

Adding support for proxy when preparing registry layers #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dnewhook
Copy link

Container will respect environment variables when connecting to a registry to prepare layers:
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
This is based on quay/clair#530

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #22 (e4f7c6d) into master (3e9154f) will decrease coverage by 4.26%.
The diff coverage is 25.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
- Coverage   50.35%   46.09%   -4.27%     
==========================================
  Files          13       14       +1     
  Lines         556      564       +8     
==========================================
- Hits          280      260      -20     
- Misses        259      286      +27     
- Partials       17       18       +1     
Impacted Files Coverage Δ
pkg/etc/config.go 38.70% <ø> (-5.74%) ⬇️
pkg/registry/client.go 0.00% <0.00%> (ø)
pkg/redisx/pool.go 25.67% <25.67%> (ø)
pkg/scanner/adapter.go 64.00% <0.00%> (-6.00%) ⬇️
pkg/harbor/model.go 81.81% <0.00%> (-3.90%) ⬇️
pkg/http/api/base_handler.go 72.22% <0.00%> (-1.70%) ⬇️
pkg/http/api/v1/handler.go 92.12% <0.00%> (-0.47%) ⬇️
pkg/job/job.go 100.00% <0.00%> (ø)
pkg/work/work.go 0.00% <0.00%> (ø)
... and 7 more

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 a80ecc0...e4f7c6d. Read the comment docs.

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @dnewhook The change looks good to me. I just left a minor comment to format the code.

@@ -47,6 +47,7 @@ func (cf *clientFactory) Get() Client {
RootCAs: cf.tlsConfig.RootCAs,
InsecureSkipVerify: cf.tlsConfig.InsecureSkipVerify,
},
Proxy: http.ProxyFromEnvironment,
Copy link
Contributor

Choose a reason for hiding this comment

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

Use tabs instead of spaces:

gofmt -w pkg

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.

2 participants