From 1e210a2c8cc5117d1055bfaa5d40f51bbc2e345e Mon Sep 17 00:00:00 2001 From: wujunwei Date: Tue, 28 Mar 2023 14:52:16 +0800 Subject: [PATCH] add GetRegistryClient method Signed-off-by: wujunwei (cherry picked from commit c87f846d8869ddf684e5a2d53c343a89f25bdbb5) --- cmd/helm/install.go | 1 + pkg/action/install.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 13c674066..6ffc968ce 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -252,6 +252,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options RepositoryConfig: settings.RepositoryConfig, RepositoryCache: settings.RepositoryCache, Debug: settings.Debug, + RegistryClient: client.GetRegistryClient(), } if err := man.Update(); err != nil { return nil, err diff --git a/pkg/action/install.go b/pkg/action/install.go index d5c34cef7..d19972e1b 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -142,6 +142,11 @@ func (i *Install) SetRegistryClient(registryClient *registry.Client) { i.ChartPathOptions.registryClient = registryClient } +// GetRegistryClient get the registry client. +func (i *Install) GetRegistryClient() *registry.Client { + return i.ChartPathOptions.registryClient +} + func (i *Install) installCRDs(crds []chart.CRD) error { // We do these one file at a time in the order they were read. totalItems := []*resource.Info{}