fix: --state-values-set panic: value of type interface {} is not assignable to type string (#680)

Probably since #647 helmfile has been unable to merge nested maps in environment values if they were loaded from files. This fixes it.

The relevant test is also enhanced so that no further regression like this happens.

Fixes #677
This commit is contained in:
KUOKA Yusuke
2019-06-12 13:35:04 +09:00
committed by GitHub
parent 11eda66eaa
commit 78b03e0d92
6 changed files with 113 additions and 102 deletions
+2
View File
@@ -46,6 +46,8 @@ func (r *FileRenderer) RenderTemplateFileToBuffer(file string) (*bytes.Buffer, e
return r.RenderTemplateContentToBuffer(content)
}
// RenderToBytes loads the content of the file.
// If its extension is `gotmpl` it treats the content as a go template and renders it.
func (r *FileRenderer) RenderToBytes(path string) ([]byte, error) {
var yamlBytes []byte
splits := strings.Split(path, ".")