|
|
@ -267,7 +267,7 @@ func (i *installCmd) run() error {
|
|
|
|
return fmt.Errorf("cannot load requirements: %v", err)
|
|
|
|
return fmt.Errorf("cannot load requirements: %v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
res, err := i.client.InstallReleaseFromChart(
|
|
|
|
resp, err := i.client.InstallReleaseFromChart(
|
|
|
|
chartRequested,
|
|
|
|
chartRequested,
|
|
|
|
i.namespace,
|
|
|
|
i.namespace,
|
|
|
|
helm.ValueOverrides(rawVals),
|
|
|
|
helm.ValueOverrides(rawVals),
|
|
|
@ -278,15 +278,25 @@ func (i *installCmd) run() error {
|
|
|
|
helm.InstallDisableCRDHook(i.disableCRDHook),
|
|
|
|
helm.InstallDisableCRDHook(i.disableCRDHook),
|
|
|
|
helm.InstallTimeout(i.timeout),
|
|
|
|
helm.InstallTimeout(i.timeout),
|
|
|
|
helm.InstallWait(i.wait))
|
|
|
|
helm.InstallWait(i.wait))
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return prettyError(err)
|
|
|
|
// If there is an error while waiting, make a call without waiting to get the release content
|
|
|
|
|
|
|
|
if (resp == nil || resp.Release == nil) && i.wait {
|
|
|
|
|
|
|
|
if res, e := i.client.ReleaseContent(i.name); e != nil {
|
|
|
|
|
|
|
|
fmt.Fprintf(i.out, "Error reading release content: %v", prettyError(e))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
printRelease(i.out, res.Release)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
rel := resp.GetRelease()
|
|
|
|
|
|
|
|
if rel == nil {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
printRelease(i.out, rel)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
rel := res.GetRelease()
|
|
|
|
if err != nil {
|
|
|
|
if rel == nil {
|
|
|
|
return prettyError(err)
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
i.printRelease(rel)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If this is a dry run, we can't display status.
|
|
|
|
// If this is a dry run, we can't display status.
|
|
|
|
if i.dryRun {
|
|
|
|
if i.dryRun {
|
|
|
@ -298,7 +308,7 @@ func (i *installCmd) run() error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Print the status like status command does
|
|
|
|
// Print the status like status command does
|
|
|
|
status, err := i.client.ReleaseStatus(rel.Name)
|
|
|
|
status, err := i.client.ReleaseStatus(i.name)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return prettyError(err)
|
|
|
|
return prettyError(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|