Skip to content

helmfile sync --timeout <timeout_value> returns "unknown flag: --timeout" despite being documented as supported #1543

Description

@frankgrimes97

Operating system

macOS Ventura 13.6.7 (22G720)

Helmfile Version

v0.165.0

Helm Version

version.BuildInfo{Version:"v3.11.3", GitCommit:"323249351482b3bbfc9f5004f65d400aa70f9ae7", GitTreeState:"clean", GoVersion:"go1.20.3"}

Bug description

The helmfile sync --timeout option does not appear to be supported despite being documented.

# wait for k8s resources via --wait. (default false)
wait: true
# if set and --wait enabled, will wait until all Jobs have been completed before marking the release as successful. It will wait for as long as --timeout (default false, Implemented in Helm3.5)
waitForJobs: true
# time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks, and waits on pod/pvc/svc/deployment readiness) (default 300)
timeout: 600

$ helmfile sync --timeout 900
unknown flag: --timeout

$ echo $?
3

The --wait and --wait-for-jobs options do appear to be accepted as documented:

$ helmfile sync --wait false --wait-for-jobs false --help
...<SNIP HELP OUTPUT>...

$ echo $?
0

Looking at the code, it appears that timeout may not have been implemented:

  • helmfile/cmd/sync.go

    Lines 44 to 45 in 3f6c039

    f.BoolVar(&syncOptions.Wait, "wait", false, `Override helmDefaults.wait setting "helm upgrade --install --wait"`)
    f.BoolVar(&syncOptions.WaitForJobs, "wait-for-jobs", false, `Override helmDefaults.waitForJobs setting "helm upgrade --install --wait-for-jobs"`)
  • // Wait is the wait flag
    Wait bool
    // WaitForJobs is the wait for jobs flag
    WaitForJobs bool

Example helmfile.yaml

N/A

Error message you've seen (if any)

unknown flag: --timeout

Steps to reproduce

helmfile sync --timeout 900

Working Helmfile Version

N/A

Relevant discussion

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions