Added support for string template rendering in additional properties fields#181
Added support for string template rendering in additional properties fields#181Secchol wants to merge 2 commits intodevelop/12.2from
Conversation
templates/_helpers.tpl
Outdated
| {{/* | ||
| Render string and yaml templates | ||
| */}} | ||
| {{- define "render.list.singleMaps" -}} |
There was a problem hiding this comment.
What are the advantages of this over the approach in https://github.com/Ontotext-AD/graphdb-helm/blob/main/templates/extra-objects.yaml#L3
There was a problem hiding this comment.
The approach that has been used for defining extra objects does not work in this case since these fields expect a map or a list of maps as their value and throw an error if a string block is given. In this approach https://github.com/Ontotext-AD/graphdb-helm/blob/main/templates/extra-objects.yaml#L3 if a string block is passed the whole document is templated and is still valid yaml(Because these are emitted at the document root, they are complete objects, so Kubernetes knows how to handle them.), but in this case the final output must be structured data.
templates/graphdb/statefulset.yaml
Outdated
| {{- end }} | ||
| {{- with .Values.extraVolumeClaimTemplates }} | ||
| {{- tpl (toYaml .) $ | nindent 4 }} | ||
| {{- include "render.list.singleMaps" (dict "ctx" $ "items" .) | indent 4 }} |
There was a problem hiding this comment.
Return the indentation..
There was a problem hiding this comment.
Could not find a way to return it as it was with the current state of the helper template. Will have to discuss changing it.
…wing properties: - `extraEnvFrom` - `extraEnv` - `extraVolumes` - `extraVolumeMounts` - `extraVolumeClaimTemplates` - `extraInitContainers` - `extraContainerPorts` - `extraContainers`
ff2fb32 to
2211ecc
Compare
Added support for string template rendering in in the following properties:
extraEnvFromextraEnvextraVolumesextraVolumeMountsextraVolumeClaimTemplatesextraInitContainersextraContainerPortsextraContainers