From 72c0c1ae8bb867112d5f425a67b47d044a08e449 Mon Sep 17 00:00:00 2001 From: Sushil Kumar Date: Fri, 7 Apr 2017 14:42:15 -0700 Subject: [PATCH] Replaced InstallRelease with InstallReleaseFromChart in cmd/install.go Fixes https://github.com/kubernetes/helm/issues/2240 `helm install` command was calling chartutil.Load twice, once from `run` method and another time from `client.InstallRelease` which is called from `run` method in `cmd/helm/install.go` --- cmd/helm/install.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 779539964..d738b4349 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -202,14 +202,17 @@ func (i *installCmd) run() error { } // Check chart requirements to make sure all dependencies are present in /charts - if c, err := chartutil.Load(i.chartPath); err == nil { - if req, err := chartutil.LoadRequirements(c); err == nil { - checkDependencies(c, req, i.out) - } + chartRequested, err := chartutil.Load(i.chartPath) + if err != nil { + return prettyError(err) + } + + if req, err := chartutil.LoadRequirements(chartRequested); err == nil { + checkDependencies(chartRequested, req, i.out) } - res, err := i.client.InstallRelease( - i.chartPath, + res, err := i.client.InstallReleaseFromChart( + chartRequested, i.namespace, helm.ValueOverrides(rawVals), helm.ReleaseName(i.name),