helmfile/pkg
yxxhero 38e27ee439
fix: include release values in .Values for patch template rendering (#2556)
* fix: include release values in .Values for jsonPatches/strategicMergePatches/transformers gotmpl rendering

Before this fix, .Values in patch template files only contained environment
values, not the release's own values. This meant references like
{{ .Values.ingress.enabled }} would fail when ingress.enabled was set in
the release's values: file rather than environment values.

Now patch gotmpl files see .Values as merged(environment values, release values),
matching user expectations that values defined in the release should be
accessible in conditional patches.

Fixes #1904

Signed-off-by: yxxhero <aiopsclub@163.com>

* test: add more tests for resolveReleaseValues, renderValuesFileToBytesWithData, and generateTemporaryReleaseValuesFilesWithData

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/5da5c9d8-7464-4146-84b5-1433ed6193f3

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* test: simplify newTestHelmStateWithFiles by removing empty cleanup func

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/5da5c9d8-7464-4146-84b5-1433ed6193f3

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* fix: remove always-constant basePath param from newTestHelmStateWithFiles to fix unparam lint error

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/b4a669cb-692c-4ca6-a68b-1b04a062b989

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* fix: address c66017c review comments - error messages, defer-in-loop, map normalization, test cleanup

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/44988dd8-1c67-465b-995c-80525a24eb93

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* refactor: extract generateTemporaryReleaseValuesFilesCore to eliminate duplication; fix temp dir leaks in tests

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/b254ddda-aa95-4e2f-8dd9-1ce4c40eedb6

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* fix: remove rendered content from debug log; extract prepareReleaseValuesEntries shared helper

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/321c6ba5-f835-4afd-be5e-ee790bc6b4a5

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* fix: compute mergedReleaseTemplateData lazily in PrepareChartify

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/100b7974-3268-4dc8-be21-12bd82aa2dbb

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* fix: normalize nested YAML keys in resolveReleaseValues via CastKeysToStrings

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d0129d85-9c7d-4a31-966e-fc0b05b74867

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* fix: use %w for error wrapping in release values resolution

Signed-off-by: yxxhero <aiopsclub@163.com>

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-15 16:31:46 +08:00
..
app Add App.WithFileSystem (#2638) 2026-06-14 09:27:24 +08:00
argparser
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
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
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
state fix: include release values in .Values for patch template rendering (#2556) 2026-06-15 16:31:46 +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
yaml