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`
pull/2241/head
Sushil Kumar 8 years ago
parent 6506c145b6
commit 72c0c1ae8b

@ -202,14 +202,17 @@ func (i *installCmd) run() error {
} }
// Check chart requirements to make sure all dependencies are present in /charts // Check chart requirements to make sure all dependencies are present in /charts
if c, err := chartutil.Load(i.chartPath); err == nil { chartRequested, err := chartutil.Load(i.chartPath)
if req, err := chartutil.LoadRequirements(c); err == nil { if err != nil {
checkDependencies(c, req, i.out) return prettyError(err)
} }
if req, err := chartutil.LoadRequirements(chartRequested); err == nil {
checkDependencies(chartRequested, req, i.out)
} }
res, err := i.client.InstallRelease( res, err := i.client.InstallReleaseFromChart(
i.chartPath, chartRequested,
i.namespace, i.namespace,
helm.ValueOverrides(rawVals), helm.ValueOverrides(rawVals),
helm.ReleaseName(i.name), helm.ReleaseName(i.name),

Loading…
Cancel
Save