From b310a851c7601fa3ce07b7057c830c5c1a2404e1 Mon Sep 17 00:00:00 2001 From: Soule BA Date: Fri, 17 May 2024 11:57:50 +0200 Subject: [PATCH] Use the transport pool If implemented, A transport from the pool with safe defaults will be used when creating an oci registry client. This will enable using the proxy configuration. Signed-off-by: Soule BA --- internal/helm/registry/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/helm/registry/client.go b/internal/helm/registry/client.go index 8f2b315c2..5b89ea12e 100644 --- a/internal/helm/registry/client.go +++ b/internal/helm/registry/client.go @@ -69,10 +69,10 @@ func newClient(credentialsFile string, tlsConfig *tls.Config, insecureHTTP bool) opts = append(opts, registry.ClientOptPlainHTTP()) } if tlsConfig != nil { + t := http.DefaultTransport.(*http.Transport).Clone() + t.TLSClientConfig = tlsConfig opts = append(opts, registry.ClientOptHTTPClient(&http.Client{ - Transport: &http.Transport{ - TLSClientConfig: tlsConfig, - }, + Transport: t, })) } if credentialsFile != "" {