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:
Aleksei Sviridkin 2026-01-30 14:59:40 +03:00
parent c3197d59fa
commit 467b1eb350
No known key found for this signature in database
GPG key ID: 7988329FDF395282

View file

@ -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 }}