mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-19 17:41:58 +02:00
feat: inject cli state values (--state-values-set) into environment templating context (#1917)
* feat: inject cli state values (--state-values-set) into environment templating context Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com> * test: added envvals_loader unit test for environment values Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com> * test: added 'state values set cli args in environments' integration test Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com> * fix: merge environments before loadValuesEntries Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com> * fix: 'state values set cli args in environments' integration test Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com> --------- Signed-off-by: Vincent Chenal <vincent.chenal@protonmail.com>
This commit is contained in:
@@ -65,7 +65,7 @@ func (ld *EnvironmentValuesLoader) LoadEnvironmentValues(missingFileHandler *str
|
||||
if strings.HasSuffix(f, ".hcl") {
|
||||
hclLoader.AddFile(f)
|
||||
} else {
|
||||
tmplData := NewEnvironmentTemplateData(env, "", map[string]any{})
|
||||
tmplData := NewEnvironmentTemplateData(env, "", env.Values)
|
||||
r := tmpl.NewFileRenderer(ld.fs, filepath.Dir(f), tmplData)
|
||||
bytes, err := r.RenderToBytes(f)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user