helmfile/pkg/state
Danny Shemesh 71bb7354e7
Fix: populate .Values regardless of prestate success (#1202)
This commit proposes a potential solution for
https://github.com/roboll/helmfile/issues/1201

The gist is that, if prestate rendering fails, for any reason,
we do not populate the .Values in the second pass renderer.

I think that what have been expected in this case is to populate the
.Values irregardless.

pkg/app/two_pass_renderer.go
- Migrated to use finalEnv.GetMergedValues()

pkg/environment/environment.go
- Introduced GetMergedValues, which merges the environment's defaults
and current values, and then casts the keys to string;
This was previously defined in HelmState.Values() - however, as this
method is only concerned with the environment, I think it's more
appropriate for it to sit here.

pkg/state/state_exec_tmpl.go
- Extracted out HelmState.Values() to environment.go, see above
2020-04-17 09:18:01 +09:00
..
testdata Add regression tests for environment values merge (#1170) 2020-04-04 14:27:29 +09:00
chart_dependency.go Fix `deps` error for helm 3.0.2 (#1056) 2019-12-27 09:15:07 +09:00
create.go fix: .Values is missing keys with zero values (#1185) 2020-04-10 08:21:23 +09:00
create_test.go Fix panic while loading environment secrets (#1164) 2020-03-30 20:13:40 +09:00
environment.go feat: Advanced Templating (#823) 2019-08-31 14:31:31 +09:00
envvals_loader.go feat: fix empty map merge after mergo bump 2020-04-03 15:01:27 +02:00
envvals_loader_test.go Add regression tests for environment values merge (#1170) 2020-04-04 14:27:29 +09:00
helmx.go feat: Adopt existing K8s resources as Helm release on install (#746) 2019-07-11 09:13:34 +09:00
release.go Allow combining valuesTemplate and values, same for setTemplate (#938) 2019-11-15 08:52:10 +09:00
release_error.go Fix misleading `helmfile diff` output (#1174) 2020-04-04 17:39:20 +09:00
release_filters.go chore: tidy up pkgs (#636) 2019-06-01 13:36:05 +09:00
state.go fix: helmDefaults.timeout and releases[].timeout not working for `helmfile test` (#1211) 2020-04-17 09:08:21 +09:00
state_exec_tmpl.go Fix: populate .Values regardless of prestate success (#1202) 2020-04-17 09:18:01 +09:00
state_exec_tmpl_test.go fix: Fix `needs` to work for upgrades and when selectors are provided (#922) 2019-11-02 14:04:16 +09:00
state_run.go feat: `helmBinary` in helmfile.yaml (#1160) 2020-03-29 17:51:07 +09:00
state_test.go feat: add option `--include-tests` for diff and apply command (#1179) 2020-04-05 17:43:54 +09:00
storage.go chore: tidy up pkgs (#636) 2019-06-01 13:36:05 +09:00
types.go feat: state values (#647) 2019-06-04 16:34:02 +09:00
util.go fix: absolute chart path (#753) 2019-07-12 22:37:54 +09:00
util_test.go fix: absolute chart path (#753) 2019-07-12 22:37:54 +09:00