Merge pull request #1513 from fluxcd/backport-1490-to-release/v1.3.x
[release/v1.3.x] helm: Use the default transport pool to preserve proxy settings
This commit is contained in:
commit
b7d992770e
|
@ -69,10 +69,10 @@ func newClient(credentialsFile string, tlsConfig *tls.Config, insecureHTTP bool)
|
||||||
opts = append(opts, registry.ClientOptPlainHTTP())
|
opts = append(opts, registry.ClientOptPlainHTTP())
|
||||||
}
|
}
|
||||||
if tlsConfig != nil {
|
if tlsConfig != nil {
|
||||||
|
t := http.DefaultTransport.(*http.Transport).Clone()
|
||||||
|
t.TLSClientConfig = tlsConfig
|
||||||
opts = append(opts, registry.ClientOptHTTPClient(&http.Client{
|
opts = append(opts, registry.ClientOptHTTPClient(&http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: t,
|
||||||
TLSClientConfig: tlsConfig,
|
|
||||||
},
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
if credentialsFile != "" {
|
if credentialsFile != "" {
|
||||||
|
|
Loading…
Reference in New Issue