From 8f637137dce29465c50793d0127fb8d2d5afdf93 Mon Sep 17 00:00:00 2001 From: Theo Chupp Date: Thu, 25 Mar 2021 15:16:49 -0400 Subject: [PATCH] fix: assign RegistryClient when running install action Signed-off-by: Theo Chupp --- cmd/helm/install.go | 1 + pkg/action/install.go | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 794fef52c..23ea1afb1 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -241,6 +241,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options Keyring: client.ChartPathOptions.Keyring, SkipUpdate: false, Getters: p, + RegistryClient: client.RegistryClient, RepositoryConfig: settings.RepositoryConfig, RepositoryCache: settings.RepositoryCache, Debug: settings.Debug, diff --git a/pkg/action/install.go b/pkg/action/install.go index fa5508234..df6238aa9 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -102,6 +102,8 @@ type Install struct { PostRenderer postrender.PostRenderer // Lock to control raceconditions when the process receives a SIGTERM Lock sync.Mutex + // RegistryClient is a client for working with registries + RegistryClient *registry.Client } // ChartPathOptions captures common options used for controlling chart paths @@ -125,12 +127,10 @@ type ChartPathOptions struct { // NewInstall creates a new Install object with the given configuration. func NewInstall(cfg *Configuration) *Install { - in := &Install{ - cfg: cfg, + return &Install{ + cfg: cfg, + RegistryClient: cfg.RegistryClient, } - in.ChartPathOptions.registryClient = cfg.RegistryClient - - return in } func (i *Install) installCRDs(crds []chart.CRD) error {