Fix some indentation behavio + add indent flag

This commit is contained in:
2022-02-16 10:56:21 +01:00
parent a4834a0661
commit 0d1a6f8c82
7 changed files with 27 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ func BuildIngress(ingress *helm.Ingress, name, templatesDir string) {
buffer := bytes.NewBuffer(nil)
fname := filepath.Join(templatesDir, name+"."+kind+".yaml")
enc := yaml.NewEncoder(buffer)
enc.SetIndent(2)
enc.SetIndent(IndentSize)
buffer.WriteString("{{- if .Values." + name + ".ingress.enabled -}}\n")
enc.Encode(ingress)
buffer.WriteString("{{- end -}}")