helmfile/pkg
yxxhero 732e4ad913
fix: helmfile fetch fails for kustomization directories (#2504)
* fix: helmfile fetch fails for kustomization directories

Fixes #2503

When running `helmfile fetch` on a release that points to a local
kustomization directory (without Chart.yaml), the command failed with
"Chart.yaml is missing".

The issue was that the condition `helmfileCommand != "pull"` in
prepareChartForRelease skipped chartification for ALL cases during
fetch, including local kustomization directories that NEED chartify
to convert them to Helm charts.

Solution:
- Added `NeedsChartifyForLocalDir` field to the Chartify struct to
  track when chartification is needed because the local directory
  is not a Helm chart (no Chart.yaml)
- Modified the condition to skip chartification for "pull" ONLY when
  it's not a local directory without Chart.yaml

This preserves the original fix (commit 1f134d93) for remote charts
with transformers while fixing local kustomization directories.

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

* test: add integration test for helmfile fetch with kustomization

Add test case for issue #2503 to verify helmfile fetch works correctly
with local kustomization directories (without Chart.yaml).

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

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
2026-03-26 09:44:28 +08:00
..
app feat: add an arg that passing description to `helm upgrade` command (#2497) 2026-03-24 21:01:44 +08:00
argparser
cluster feat: kubedog integration with unified resource handling (#2383) 2026-03-02 17:15:12 +08:00
config feat: add an arg that passing description to `helm upgrade` command (#2497) 2026-03-24 21:01:44 +08:00
environment fix: array merge regression - layer arrays now replace defaults (#2367) 2026-01-18 14:04:54 +08:00
envvar fix: error on missing secret key when using vals (#2496) 2026-03-24 09:42:54 +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 refactor(filesystem): add CopyDir method and optimize Fetch function (#2111) 2025-07-28 16:10:25 -04:00
hcllang feat: Add IP Network to supported HCL Functions (#2426) 2026-02-26 17:20:48 +08:00
helmexec fix: support XDG-style multiple paths in HELM_PLUGINS (#2412) 2026-02-20 15:27:34 +08:00
kubedog feat: add helm-legacy track mode for Helm v4 compatibility (#2466) 2026-03-08 11:51:14 +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 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: helmfile fetch fails for kustomization directories (#2504) 2026-03-26 09:44:28 +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