You've already forked helm-gitea
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 <code@inexplicity.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/915 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Javex <javex@noreply.gitea.com> Co-committed-by: Javex <javex@noreply.gitea.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{- if typeIs "string" . }}
|
||||
{{- tpl . $ }}
|
||||
{{ tpl . $ }}
|
||||
{{- else }}
|
||||
{{- tpl (. | toYaml) $ }}
|
||||
{{ tpl (. | toYaml) $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user