helmfile/pkg/state
yxxhero 615e8132ee
fix: pass --kubeconfig to chartify's helm template call (#2449)
When using jsonPatches or kustomize patches with helmfile, chartify runs
"helm template" internally to render the chart before applying patches.
The lookup() helm function requires cluster access (--dry-run=server).

Previously, --kubeconfig was passed to helm diff and helm upgrade commands,
but not to chartify's internal helm template call. This caused failures
when users specified --kubeconfig flag with a non-default kubeconfig location.

This fix ensures --kubeconfig is passed to chartify's TemplateArgs for
cluster-requiring commands (sync, apply, diff, etc.), alongside the existing
--kube-context and --dry-run=server flags.

Fixes #2444

Signed-off-by: yxxhero <aiopsclub@163.com>
2026-03-03 20:56:46 +08:00
..
testdata
chart_dependencies_rewrite_test.go
chart_dependency.go
chart_dependency_test.go
create.go
create_test.go
diff_error_propagation_test.go
environment.go
envvals_loader.go
envvals_loader_test.go
helmx.go
helmx_test.go
issue_2297_test.go
issue_2355_test.go
issue_2444_test.go fix: pass --kubeconfig to chartify's helm template call (#2449) 2026-03-03 20:56:46 +08:00
oci_chart_lock_test.go
oci_chart_version_test.go
oci_parse_test.go
release.go
release_error.go
release_filters.go
release_filters_test.go
release_test.go
run_helm_dep_builds_skip_refresh_test.go
selector_test.go
skip_test.go
state.go fix: pass --kubeconfig to chartify's helm template call (#2449) 2026-03-03 20:56:46 +08:00
state_exec_tmpl.go
state_exec_tmpl_test.go
state_gogetter_test.go
state_kubeversion_test.go
state_run.go
state_test.go
storage.go
storage_test.go
temp.go
temp_test.go
types.go
util.go
util_test.go