norwoodj / helm-docs

A tool for automatically generating markdown documentation for helm charts
GNU General Public License v3.0
1.4k stars 187 forks source link

[Bug]: template: multiple definition of template #277

Open wrenix opened 1 week ago

wrenix commented 1 week ago

Is there an existing issue for this?

Current Behavior

WARN[2024-11-08T17:27:02+01:00] Error generating gotemplates for chart chart-a: template: base:31: template: multiple definition of template "changelog" 

Expected Behavior

on chart-a i got:

### Version 2 to 3
- split of `image.repository` to `image.registry` and `image.repository`

on every other chart:

No Breaking changes yet

Reference Chart

Test-setup:

helm-docs -t ./default.gotmpl -t on_chart.gotmpl

./default.gotmpl:

{{- block "changelog" . }}
No Breaking changes yet
{{- end }}

./chart-a/on_chart.gotmpl:

{{- define "changelog" }}
### Version 2 to 3
- split of `image.repository` to `image.registry` and `image.repository`
{{- end }}

Reference Template

No response

Environment

Link to helm-docs Logs

No response

Further Information

No response