mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 19:01:50 +02:00
Add missing --timeout flag to helmfile sync command with documentation (#2148)
* Initial plan * Implement --timeout flag for helmfile sync command - Add Timeout field to SyncOptions struct in pkg/config/sync.go - Add --timeout flag to sync command in cmd/sync.go - Add Timeout field to SyncOpts struct in pkg/state/state.go - Modify timeoutFlags() function to prioritize CLI timeout over release and default configs - Add test case to verify CLI timeout overrides other timeout settings - Follow same pattern as existing --wait and --wait-for-jobs flags Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> * Fix lint issues: format test struct fields properly Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> * Update docs: Add --timeout flag documentation for helmfile sync command Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
This commit is contained in:
@@ -24,6 +24,8 @@ type SyncOptions struct {
|
||||
WaitRetries int
|
||||
// WaitForJobs is the wait for jobs flag
|
||||
WaitForJobs bool
|
||||
// Timeout is the timeout flag in seconds
|
||||
Timeout int
|
||||
// ReuseValues is true if the helm command should reuse the values
|
||||
ReuseValues bool
|
||||
// ResetValues is true if helm command should reset values to charts' default
|
||||
@@ -124,6 +126,11 @@ func (t *SyncImpl) WaitForJobs() bool {
|
||||
return t.SyncOptions.WaitForJobs
|
||||
}
|
||||
|
||||
// Timeout returns the timeout
|
||||
func (t *SyncImpl) Timeout() int {
|
||||
return t.SyncOptions.Timeout
|
||||
}
|
||||
|
||||
// ReuseValues returns the ReuseValues.
|
||||
func (t *SyncImpl) ReuseValues() bool {
|
||||
if !t.ResetValues() {
|
||||
|
||||
Reference in New Issue
Block a user