In helm I have the following .Values
mqtt:
topics:
- /tenant/+/#
- /otherStuff/
- /importantStuff/
tenants:
- id: tenantA
name: Tenant A
- id: tenantB
name: Tenant B
Instead of the wildcard topic /tenant/+/#
I reather would like to have the topics tenant specific:
/tenant/tenantA/#
/tenant/tenantB/#
So I tried what would make sense to me should work:
mqtt:
topics:
{{- range .Values.tenants }}
- /tenant/{{ .id }}/#
{{ end }}
- /otherStuff/
- /importantStuff/
This leads to multiple errors
A block sequence may not be used as an implicit map key
Implicit keys need to be on a single line
Implicit map keys need to be followed by map values
While not completly understanding the errors, it seems to me that this approach does not work or I am doing something completely wrong.
How can I loop in my .Values over a range and generate to generate a list?
Helm Playground (Actually shows a different error as visual studio code does, but probably the same lead)