feat(helm): add ability for --dry-run to do lookup functions

When a helm command is run with the --dry-run flag, it will try to connect to the cluster
if the value is 'server' to be able to render lookup functions.
Closes #8137

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
This commit is contained in:
Tapas Kapadia
2023-01-27 20:08:44 -06:00
parent 9a0025f963
commit 25ac62e153

View File

@@ -211,7 +211,7 @@ func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals ma
var interactWithRemote bool
// `helm template` is the only command that Install.APIVersions field will not be nil.
if (!i.DryRun || i.DryRunOption == "server") && i.APIVersions == nil {
if !i.DryRun || i.DryRunOption == "server" {
interactWithRemote = true
}