Commit 611bba0f authored by Anubhav Mishra's avatar Anubhav Mishra

fix(helm): manifests string parsing works for newlines in the manifests

Trying to fix #2158
parent ea61ace8
...@@ -40,7 +40,9 @@ func SplitManifests(bigfile string) map[string]string { ...@@ -40,7 +40,9 @@ func SplitManifests(bigfile string) map[string]string {
sep := "\n---\n" sep := "\n---\n"
tpl := "manifest-%d" tpl := "manifest-%d"
res := map[string]string{} res := map[string]string{}
tmp := strings.Split(bigfile, sep) // Making sure yaml formatting doesn't matter when generating manifest from string.
bigFileTmp := strings.TrimSpace(bigfile)
tmp := strings.Split(bigFileTmp, sep)
for i, d := range tmp { for i, d := range tmp {
res[fmt.Sprintf(tpl, i)] = d res[fmt.Sprintf(tpl, i)] = d
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment