helmfile/pkg/state
Yusuke Kuoka 8e50dbc46d Fix helmfile deps not to remove entries for charts that are being chartified
When chartify is involved due to the use of `forceNamespace`, `strategicMergePatches`, `jsonPatches`, and so on, We had been internally mutating the Release.Chart with the path to the local temporary directory that contains the modified version of the chart.

This resulted in us unintentionally making `helmfile deps` to remove entries for the chart being modified out of helmfile.lock file, which resulted in issues like #2110.

To be clear, although the original issue is reported to occur for `strategicMergePatches`, I believe that it occurered also for any remote charts using `jsonPatches` and `forceNamespace` too.

I also believe this has been the issue since our introduction of chartify (maybe a year or so ago??), and I guess why it took so much time to be found and reported is that not so many people with chartify in combination with `helmfile deps` 🤔

Lastly, this changes chart names surfaced in the various log output from Helmfile, from temporary chart paths to the chart name/path declared in the helmfile.yaml. I think this is generally a good change, no fear of being a breaking change. But if anyone has any concern about that, please feel free to comment/report/etc.

Ref https://github.com/roboll/helmfile/issues/2110

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
2022-04-06 02:12:08 +00:00
..
testdata Add regression tests for environment values merge (#1170) 2020-04-04 14:27:29 +09:00
chart_dependency.go remove ioutil usage in all project 2022-04-03 15:53:19 +08:00
create.go Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
create_test.go remove ioutil usage in all project 2022-04-03 15:53:19 +08:00
environment.go Add support for kubeContext in environments (#1675) 2021-03-23 18:06:53 +09:00
envvals_loader.go Add .StateValues as alias of .Values in EnvironmentTemplateData (#2056) 2022-03-31 10:57:33 +09:00
envvals_loader_test.go remove ioutil usage in all project 2022-04-03 15:53:19 +08:00
helmx.go Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
release.go Make release template to work on `needs` (#2099) 2022-03-10 18:42:55 +09:00
release_error.go Fix misleading `helmfile diff` output (#1174) 2020-04-04 17:39:20 +09:00
release_filters.go Allow more characters in label selectors (#2064) 2022-03-09 20:38:29 +09:00
selector_test.go Allow more characters in label selectors (#2064) 2022-03-09 20:38:29 +09:00
state.go Fix helmfile deps not to remove entries for charts that are being chartified 2022-04-06 02:12:08 +00:00
state_exec_tmpl.go Enhance support for kube-version and api-versions (#2121) 2022-03-31 11:02:36 +09:00
state_exec_tmpl_test.go Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
state_gogetter_test.go remove ioutil usage in all project 2022-04-03 15:53:19 +08:00
state_run.go Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
state_test.go remove ioutil usage in all project 2022-04-03 15:53:19 +08:00
storage.go Fix panic on normalizing path containing .. (#2042) 2022-01-10 17:45:44 +09:00
temp.go remove ioutil usage in all project 2022-04-03 15:53:19 +08:00
temp_rand.go feat: Stabilize helmfile-diff output (#1622) 2020-12-15 10:24:27 +09:00
temp_test.go Fix helmfile deps not to remove entries for charts that are being chartified 2022-04-06 02:12:08 +00:00
types.go Add .StateValues as alias of .Values in EnvironmentTemplateData (#2056) 2022-03-31 10:57:33 +09:00
util.go Fix various golangci-lint errors (#2059) 2022-02-12 20:28:08 +09:00
util_test.go Add support for ChartCenter (#1492) 2020-09-21 15:31:24 +09:00