-
Notifications
You must be signed in to change notification settings - Fork 23
Added support for string template rendering in additional properties fields #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop/12.2
Are you sure you want to change the base?
Added support for string template rendering in additional properties fields #181
Conversation
templates/_helpers.tpl
Outdated
| {{/* | ||
| Render string and yaml templates | ||
| */}} | ||
| {{- define "render.list.singleMaps" -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return the indentation..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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