From 424926cab46ffa0b907c5a3ab1806c4304e68161 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Wed, 9 Oct 2024 20:33:08 -0700 Subject: [PATCH] Fix oci registry login options getter Signed-off-by: Tamal Saha --- pkg/internal/helm/getter/client_opts.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/internal/helm/getter/client_opts.go b/pkg/internal/helm/getter/client_opts.go index 15e3521e..f2d9912a 100644 --- a/pkg/internal/helm/getter/client_opts.go +++ b/pkg/internal/helm/getter/client_opts.go @@ -161,11 +161,11 @@ func GetClientOpts(ctx context.Context, c client.Reader, obj *helmv1.HelmReposit return nil, "", err } if loginOpt != nil { - hrOpts.RegLoginOpts = []helmreg.LoginOption{loginOpt} - } - tlsLoginOpt := registry.TLSLoginOption(certFile, keyFile, caFile) - if tlsLoginOpt != nil { - hrOpts.RegLoginOpts = append(hrOpts.RegLoginOpts, tlsLoginOpt) + hrOpts.RegLoginOpts = []helmreg.LoginOption{loginOpt, helmreg.LoginOptInsecure(obj.Spec.Insecure)} + tlsLoginOpt := registry.TLSLoginOption(certFile, keyFile, caFile) + if tlsLoginOpt != nil { + hrOpts.RegLoginOpts = append(hrOpts.RegLoginOpts, tlsLoginOpt) + } } } if deprecatedTLSConfig {