Signed-off-by: George Jenkins <gjenkins8@bloomberg.net>
pull/11744/head
George Jenkins 3 years ago
parent 5e660d1074
commit 2b5abfcc6b

@ -266,11 +266,7 @@ func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals ma
rel := i.createRelease(chrt, vals) rel := i.createRelease(chrt, vals)
var manifestDoc *bytes.Buffer var manifestDoc *bytes.Buffer
// Determines whether `helm template` was used or another command with the --dry-run flag interactWithRemote := i.DryRunMode == DryRunModeServer
// as they both set the Install.DryRun field to `true`. The `--dry-run` flag should be able
// to connect to remote for the lookup function. `helm template` is the only command that
// Install.APIVersions field will not be nil.
interactWithRemote := !i.DryRun || i.APIVersions == nil
rel.Hooks, manifestDoc, rel.Info.Notes, err = i.cfg.renderResources(chrt, valuesToRender, i.ReleaseName, i.OutputDir, i.SubNotes, i.UseReleaseName, i.IncludeCRDs, i.PostRenderer, interactWithRemote) rel.Hooks, manifestDoc, rel.Info.Notes, err = i.cfg.renderResources(chrt, valuesToRender, i.ReleaseName, i.OutputDir, i.SubNotes, i.UseReleaseName, i.IncludeCRDs, i.PostRenderer, interactWithRemote)
// Even for errors, attach this if available // Even for errors, attach this if available
if manifestDoc != nil { if manifestDoc != nil {

Loading…
Cancel
Save