mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-17 23:16:34 +02:00
add --track-logs-interval flag (#2807)
* add --track-logs-interval flag Signed-off-by: pznamensky <kompastver@gmail.com> * address review nits: logsInterval plumbing and test coverage - kubedog: move defaultLogsInterval next to TrackOptions in options.go, where the field it defaults lives - kubedog: pass logsInterval through newProgressPrinter instead of a post-construction field assignment; zero falls back to the default - kubedog: cover WithLogsInterval and the LogsInterval default in tracker tests - config: document that defaultTrackLogsInterval is shared by sync and apply and mirrors kubedog's default - config: add a negative-interval validation test case Signed-off-by: yxxhero <aiopsclub@163.com> --------- Signed-off-by: pznamensky <kompastver@gmail.com> Signed-off-by: yxxhero <aiopsclub@163.com> Co-authored-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -330,6 +330,9 @@ func (st *HelmState) buildReleaseTracker(release *ReleaseSpec, opts *SyncOpts, u
|
||||
WithFailedLogsOnly(trackFailedLogs).
|
||||
WithFilterConfig(filterConfig).
|
||||
WithColor(useColor)
|
||||
if opts != nil && opts.TrackLogsInterval > 0 {
|
||||
trackOpts.WithLogsInterval(opts.TrackLogsInterval)
|
||||
}
|
||||
|
||||
tracker, err := kubedog.NewTracker(&kubedog.TrackerConfig{
|
||||
Logger: st.logger,
|
||||
|
||||
@@ -1083,6 +1083,7 @@ type SyncOpts struct {
|
||||
TrackTimeout int
|
||||
TrackLogs bool
|
||||
TrackFailedLogs bool
|
||||
TrackLogsInterval time.Duration
|
||||
HelmStuckGrace int
|
||||
TrackFailOnError bool
|
||||
Description string
|
||||
|
||||
Reference in New Issue
Block a user