From 1189521a7da5e5ef0787a8f1f4e07bc3ebda66ec Mon Sep 17 00:00:00 2001 From: Javex Date: Fri, 21 Nov 2025 14:52:41 +0000 Subject: [PATCH] Fix multiple extraDeploy objects linting (#915) ### Description of the change When the template is rendered, preceding whitespace is removed, creating a yaml object like `---apiVersion: ...` which `helm template` can handle but `helm lint` fails on as discussed in https://github.com/helm/helm/issues/10149. By not removing this whitespace, templates render correctly. ### Benefits `helm lint` will pass ### Possible drawbacks `helm diff` and similar tools might display whitespace changes, but no semantic changes. ### Checklist Added no unit tests because there are non for `extraDeploy`. - [ ] Helm templating unittests are added (required when changing anything in `templates` folder) Co-authored-by: javex Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/915 Reviewed-by: Lunny Xiao Co-authored-by: Javex Co-committed-by: Javex --- templates/gitea/extra-list.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/gitea/extra-list.yaml b/templates/gitea/extra-list.yaml index 62c0aca..d727e00 100644 --- a/templates/gitea/extra-list.yaml +++ b/templates/gitea/extra-list.yaml @@ -1,8 +1,8 @@ {{- range .Values.extraDeploy }} --- {{- if typeIs "string" . }} - {{- tpl . $ }} + {{ tpl . $ }} {{- else }} - {{- tpl (. | toYaml) $ }} + {{ tpl (. | toYaml) $ }} {{- end }} {{- end }}