diff --git a/pkg/state/state.go b/pkg/state/state.go index 68f7ad39..ee908c52 100644 --- a/pkg/state/state.go +++ b/pkg/state/state.go @@ -1190,7 +1190,7 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre skipDepsDefault := release.SkipDeps == nil && st.HelmDefaults.SkipDeps skipDeps := (!isLocal && !chartFetchedByGoGetter) || skipDepsGlobal || skipDepsRelease || skipDepsDefault - if chartification != nil { + if chartification != nil && helmfileCommand != "pull" { c := chartify.New( chartify.HelmBin(st.DefaultHelmBinary), chartify.UseHelm3(helm3), diff --git a/test/integration/run.sh b/test/integration/run.sh index 111a1814..f2f54cc4 100755 --- a/test/integration/run.sh +++ b/test/integration/run.sh @@ -85,6 +85,7 @@ ${kubectl} create namespace ${test_ns} || fail "Could not create namespace ${tes # TEST CASES---------------------------------------------------------------------------------------------------------- +. ${dir}/test-cases/kustomized-fetch.sh . ${dir}/test-cases/happypath.sh . ${dir}/test-cases/regression.sh . ${dir}/test-cases/secretssops.sh diff --git a/test/integration/test-cases/kustomized-fetch.sh b/test/integration/test-cases/kustomized-fetch.sh new file mode 100644 index 00000000..1a1d9780 --- /dev/null +++ b/test/integration/test-cases/kustomized-fetch.sh @@ -0,0 +1,12 @@ +yaml_kustomized_fetch_input_dir="${cases_dir}/kustomized-fetch/input" + +test_start "kustomized fetch issue" +info "Checking kustomized fetch issue with ${yaml_kustomized_fetch_input_dir}/helmfile.yaml" + +for i in $(seq 10); do + info "checking kustomized fetch issue #$i" + kustomized_fetch_tmp=$(mktemp -d) + ${helmfile} -f ${yaml_kustomized_fetch_input_dir}/helmfile.yaml fetch --output-dir ${kustomized_fetch_tmp} || fail "\"helmfile fetch\" shouldn't fail" + rm -fr ${kustomized_fetch_tmp} + echo code=$? +done \ No newline at end of file diff --git a/test/integration/test-cases/kustomized-fetch/input/helmfile.yaml b/test/integration/test-cases/kustomized-fetch/input/helmfile.yaml new file mode 100644 index 00000000..3b06870c --- /dev/null +++ b/test/integration/test-cases/kustomized-fetch/input/helmfile.yaml @@ -0,0 +1,26 @@ +repositories: +- name: incubator + url: https://charts.helm.sh/incubator +--- +releases: +- name: service-a + chart: incubator/raw + values: + - resources: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: raw1 + namespace: default + data: + foo: FOO + transformers: + - apiVersion: builtin + kind: LabelTransformer + metadata: + name: justForTests + labels: + some-cool: label + fieldSpecs: + - path: metadata/labels + create: true \ No newline at end of file