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

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

Signed-off-by: Tapas Kapadia <tapaskapadia10@gmail.com>
pull/9426/head
Tapas Kapadia 2 years ago
parent d66c7db55a
commit 5ec7913fd4

@ -265,7 +265,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
client.Namespace = settings.Namespace() client.Namespace = settings.Namespace()
// validate dry-run flag value is one of the allowed values // validate dry-run-option flag value is one of the allowed values
if err := validateDryRunOptionFlag(client.DryRunOption); err != nil { if err := validateDryRunOptionFlag(client.DryRunOption); err != nil {
return nil, err return nil, err
} }
@ -312,7 +312,7 @@ func compInstall(args []string, toComplete string, client *action.Install) ([]st
} }
func validateDryRunOptionFlag(dryRunOptionFlagValue string) error { func validateDryRunOptionFlag(dryRunOptionFlagValue string) error {
// validate dry-run flag value with set of allowed value // validate dry-run-option flag value with set of allowed value
allowedDryRunValues := []string{"false", "true", "none", "client", "server"} allowedDryRunValues := []string{"false", "true", "none", "client", "server"}
isAllowed := false isAllowed := false
for _, v := range allowedDryRunValues { for _, v := range allowedDryRunValues {

Loading…
Cancel
Save