From 9e4577cbc367b2db637e5c04b4f0986388da4395 Mon Sep 17 00:00:00 2001 From: Graeme Gillies Date: Wed, 10 Jun 2026 10:10:22 +1000 Subject: [PATCH] fix: Fix broken `trackLogs` functionality in Kubedog tracker When using helmfile with the following setup ``` releases: - name: my-app chart: ./mychart trackMode: kubedog trackLogs: true trackFailOnError: true ``` We don't actually see any logs from the container being printed. This is because when building the options for the Kubedog tracker, we never specify `SaveLogsOnlyForNumberOfReplicas` which means this defaults to 0. Looking at the logic in `pkg/tracker/deployment/tracker.go` we see ``` ignoreLogs := job.ignoreLogs || job.savingLogsReplicas >= job.SaveLogsOnlyForNumberOfReplicas ``` With job.SaveLogsOnlyForNumberOfReplicas always defaulting to 0, this will always ignore logs This change sets it to a reasonable default of tracking logs from up to 10 pods. Signed-off-by: Graeme Gillies --- pkg/kubedog/tracker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/kubedog/tracker.go b/pkg/kubedog/tracker.go index cc4e11e5..e6c57d2d 100644 --- a/pkg/kubedog/tracker.go +++ b/pkg/kubedog/tracker.go @@ -238,6 +238,10 @@ func (t *Tracker) TrackResources(ctx context.Context, resources []*resource.Reso IgnoreLogs: !t.trackOptions.Logs, } + if t.trackOptions.Logs { + opts.SaveLogsOnlyForNumberOfReplicas = 10 + } + var wg sync.WaitGroup errCh := make(chan error, len(targets))