diff --git a/charts/raw/Chart.yaml b/charts/raw/Chart.yaml index b720c33..2d7ecde 100644 --- a/charts/raw/Chart.yaml +++ b/charts/raw/Chart.yaml @@ -8,9 +8,12 @@ keywords: maintainers: - name: Brawdunoir email: yann.lacroix@avisto.com -version: 1.0.1 +version: 1.0.2 kubeVersion: ">=1.16.0-0" annotations: artifacthub.io/signKey: | fingerprint: AF455B903BFED8363C003F9A5E2474CA7617EC66 url: https://keybase.io/avistotelecom/pgp_keys.asc + artifacthub.io/changes: | + - kind: fixed + description: Fix regex to split objects in input templates: only the "---" line separator at the root level will be considered, excluding indented blocks with object parameters containing the "---" string as well (like TLS certificates). When upgrading to this version, be sure to verify that the templates passed in input only declare Kubernetes manifests aligned at the root level, without any leading indentation. diff --git a/charts/raw/templates/ressources.yaml b/charts/raw/templates/ressources.yaml index effc92c..915f8c4 100644 --- a/charts/raw/templates/ressources.yaml +++ b/charts/raw/templates/ressources.yaml @@ -5,7 +5,8 @@ {{- end }} {{- range $i, $t := .Values.templates }} {{ $kubeResources := tpl $t $ }} -{{- range regexSplit "---" $kubeResources -1 }} +{{/* Match "---" line separator without leading indentation and with potential trailing whitespaces or comment before the end of line */}} +{{- range regexSplit "(?m)^---\\s*(#.*)?$" $kubeResources -1 }} {{- if . | trim }} --- {{ merge (. | fromYaml) $template | toYaml }}