Skip to content

Conversation

@Secchol
Copy link
Contributor

@Secchol Secchol commented Aug 26, 2025

Added support for string template rendering in in the following properties:

  • extraEnvFrom
  • extraEnv
  • extraVolumes
  • extraVolumeMounts
  • extraVolumeClaimTemplates
  • extraInitContainers
  • extraContainerPorts
  • extraContainers

@Secchol Secchol requested a review from mihailradkov August 26, 2025 10:09
{{/*
Render string and yaml templates
*/}}
{{- define "render.list.singleMaps" -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

{{- end }}
{{- with .Values.extraVolumeClaimTemplates }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- include "render.list.singleMaps" (dict "ctx" $ "items" .) | indent 4 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return the indentation..

Copy link
Contributor Author

@Secchol Secchol Aug 29, 2025

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.

@Secchol Secchol changed the base branch from main to develop/12.2 August 28, 2025 12:02
…wing properties:

  - `extraEnvFrom`
  - `extraEnv`
  - `extraVolumes`
  - `extraVolumeMounts`
  - `extraVolumeClaimTemplates`
  - `extraInitContainers`
  - `extraContainerPorts`
  - `extraContainers`
@Secchol Secchol force-pushed the GDB-12192-Extend-the-support-for-helm-templates-in-values.yaml branch from ff2fb32 to 2211ecc Compare August 28, 2025 12:05
@Secchol Secchol requested a review from mihailradkov August 28, 2025 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants