fix(platform): preserve trailing newlines in package helper templates
Remove trailing dash from {{- end -}} constructs in _helpers.tpl to
preserve trailing newlines after each rendered package YAML document.
Without this fix, consecutive packages are rendered without proper
separators:
variant: default---
apiVersion: cozystack.io/v1alpha1
This causes YAML parse errors: "mapping key 'apiVersion' already
defined" because the YAML parser sees a single document with duplicate
keys instead of two separate documents.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
c3197d59fa
commit
467b1eb350
1 changed files with 6 additions and 6 deletions
|
|
@ -19,14 +19,14 @@ spec:
|
|||
components:
|
||||
{{ toYaml $components | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
{{- define "cozystack.platform.package.default" -}}
|
||||
{{- $name := index . 0 -}}
|
||||
{{- $root := index . 1 -}}
|
||||
{{- include "cozystack.platform.package" (list $name "default" $root) }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{- define "cozystack.platform.package.optional" -}}
|
||||
{{- $name := index . 0 -}}
|
||||
|
|
@ -42,11 +42,11 @@ metadata:
|
|||
name: {{ $name }}
|
||||
spec:
|
||||
variant: {{ $variant }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
{{- define "cozystack.platform.package.optional.default" -}}
|
||||
{{- $name := index . 0 -}}
|
||||
{{- $root := index . 1 -}}
|
||||
{{- include "cozystack.platform.package.optional" (list $name "default" $root) }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue