helm/helm · error
invalid wait input %q. Valid inputs are %s, %s, and %s
Error message
invalid wait input %q. Valid inputs are %s, %s, and %s
What it means
Helm 4 replaced the boolean --wait flag with a wait-strategy flag. The custom pflag value parser in pkg/cmd/flags.go accepts 'watcher' (event-driven kstatus waits), 'legacy' (Helm 3-style periodic polling), and 'hookOnly' (wait only for hook Pods/Jobs), plus the deprecated booleans true/false which map to watcher/hookOnly with a warning. Any other string reaches the default branch and is rejected before the command runs.
Source
Thrown at pkg/cmd/flags.go:116
}
return string(*ws)
}
func (ws *waitValue) Set(s string) error {
switch s {
case string(kube.StatusWatcherStrategy), string(kube.LegacyStrategy), string(kube.HookOnlyStrategy):
*ws = waitValue(s)
return nil
case "true":
slog.Warn("--wait=true is deprecated (boolean value) and can be replaced with --wait=watcher")
*ws = waitValue(kube.StatusWatcherStrategy)
return nil
case "false":
slog.Warn("--wait=false is deprecated (boolean value) and can be replaced with --wait=hookOnly")
*ws = waitValue(kube.HookOnlyStrategy)
return nil
default:
return fmt.Errorf("invalid wait input %q. Valid inputs are %s, %s, and %s", s, kube.StatusWatcherStrategy, kube.HookOnlyStrategy, kube.LegacyStrategy)
}
}
func (ws *waitValue) Type() string {
return "WaitStrategy"
}
func addChartPathOptionsFlags(f *pflag.FlagSet, c *action.ChartPathOptions) {
f.StringVar(&c.Version, "version", "", "specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not specified, the latest version is used")
f.BoolVar(&c.Verify, "verify", false, "verify the package before using it")
f.StringVar(&c.Keyring, "keyring", defaultKeyring(), "location of public keys used for verification")
f.StringVar(&c.RepoURL, "repo", "", "chart repository url where to locate the requested chart")
f.StringVar(&c.Username, "username", "", "chart repository username where to locate the requested chart")
f.StringVar(&c.Password, "password", "", "chart repository password where to locate the requested chart")
f.StringVar(&c.CertFile, "cert-file", "", "identify HTTPS client using this SSL certificate file")
f.StringVar(&c.KeyFile, "key-file", "", "identify HTTPS client using this SSL key file")
f.BoolVar(&c.InsecureSkipTLSVerify, "insecure-skip-tls-verify", false, "skip tls certificate checks for the chart download")
f.BoolVar(&c.PlainHTTP, "plain-http", false, "use insecure HTTP connections for the chart download")View on GitHub (pinned to 2a29f1770b)
Solutions
- Use an exact strategy name: --wait=watcher, --wait=legacy, or --wait=hookOnly
- Keep old Helm 3 scripts working with --wait=true (maps to watcher) or --wait=false (maps to hookOnly); these only log a deprecation warning
- Use bare `--wait` if the default (watcher) is acceptable
Example fix
# before (Helm 3 style with an invalid value) helm install myrel ./chart --wait=yes # error: invalid wait input "yes" # after helm install myrel ./chart --wait=watcher
Defensive patterns
Strategy: validation
Validate before calling
var validWaitInputs = map[string]bool{
"watcher": true, "legacy": true, "hookOnly": true, // strategies
"true": true, "false": true, // deprecated booleans
}
func validateWaitInput(s string) error {
if !validWaitInputs[s] {
return fmt.Errorf("invalid wait input %q; want watcher, legacy, or hookOnly", s)
}
return nil
} Type guard
func isWaitStrategy(s string) bool {
switch s {
case "watcher", "legacy", "hookOnly":
return true
}
return false
} Prevention
- Values are case-sensitive: always lowercase (watcher/legacy/hookOnly)
- Migrate Helm 3 scripts from --wait=true to --wait=watcher before the boolean forms are removed
- Prefer bare `--wait` (defaults to watcher) in interactive use
When it happens
Trigger: `helm install --wait=whatever`, `--wait=yes`, `--wait=Watcher` (values are case-sensitive), or any string not in {watcher, legacy, hookOnly, true, false}. Bare `--wait` is fine: its NoOptDefVal is 'watcher' (pkg/cmd/flags.go:65).
Common situations: Scripts written for Helm 3 where --wait took true/false; CI pipelines copying example commands with invented strategy names; case mismatches like 'Legacy' or 'HookOnly' vs the exact 'legacy'/'hookOnly'.
Related errors
- invalid format type
- cannot specify --post-renderer flag more than once
- invalid operation: cannot use three-way merge for unstructur
- invalid release name, must match regex %s and the length mus
- invalid dry-run value (%q). Must be "server" or "client"
AI-assisted analysis of helm/helm@2a29f1770b (2026-08-15).
Data as JSON: /api/errors/dbd4c757dda85362.
Report an issue: GitHub.