helmfile/pkg
Graeme Gillies 94e14f3b4e
fix: Fix broken `trackLogs` functionality in Kubedog tracker (#2630)
* 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 <ggillies@gitlab.com>

* fix formatting

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Graeme Gillies <ggillies@gitlab.com>

* feat: Refactor out building tracker opts into it's own function, add tests

Signed-off-by: Graeme Gillies <ggillies@gitlab.com>

---------

Signed-off-by: Graeme Gillies <ggillies@gitlab.com>
Co-authored-by: Graeme Gillies <ggillies@gitlab.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-11 17:17:28 +08:00
..
app Bump helm-diff to v3.15.8 across runtime defaults and execution environments (#2624) 2026-06-07 17:48:39 +08:00
argparser fix #1095 (#1100) 2023-11-01 11:55:55 +08:00
cluster feat: kubedog integration with unified resource handling (#2383) 2026-03-02 17:15:12 +08:00
config feat: support HELMFILE_* env vars for more global flags (#2606) 2026-05-22 09:16:52 +08:00
environment fix: boolean false overrides dropped in multi-document helmfiles (#2527) (#2532) 2026-04-12 09:44:49 +08:00
envvar feat: support HELMFILE_* env vars for more global flags (#2606) 2026-05-22 09:16:52 +08:00
errors build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
event fix: cleanup hooks not receiving error signal (#2475) 2026-03-21 14:29:32 +08:00
exectest feat: add `helmfile unittest` command for helm-unittest integration (#2400) 2026-02-16 09:45:10 +08:00
filesystem fix: eliminate race condition in rewriteChartDependencies (#2541) 2026-04-20 10:15:47 +08:00
hcllang feat: Add IP Network to supported HCL Functions (#2426) 2026-02-26 17:20:48 +08:00
helmexec fix: apply post-renderer to output-dir-template output (#2531) 2026-04-28 09:01:48 +08:00
kubedog fix: Fix broken `trackLogs` functionality in Kubedog tracker (#2630) 2026-06-11 17:17:28 +08:00
maputil fix: array merge regression - layer arrays now replace defaults (#2367) 2026-01-18 14:04:54 +08:00
plugins fix: error on missing secret key when using vals (#2496) 2026-03-24 09:42:54 +08:00
policy build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
remote fix: include query params in HTTP getter cache key (#2399) 2026-02-14 09:31:53 +08:00
resource feat: kubedog integration with unified resource handling (#2383) 2026-03-02 17:15:12 +08:00
runtime refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00
state fix: support array of maps in set/setTemplate values (#2615) 2026-05-31 09:57:35 +08:00
testhelper fix: eliminate os.Chdir in sequential helmfiles to fix relative path resolution (#2410) 2026-02-22 09:21:46 +08:00
testutil feat: add `helmfile unittest` command for helm-unittest integration (#2400) 2026-02-16 09:45:10 +08:00
tmpl refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00
yaml refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00