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 {