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:
souleb 2024-06-14 09:12:05 +02:00 committed by GitHub
commit b7d992770e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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 != "" {