You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the ability to reuse values from the pod's container in initContainers without repeating them (e.g. image, pull policy, env).
I would like the ability to mount configmap files based on iterating over files in a directory. In my case, I have added a directory containing my files and a configmap generator to create the CMs. I would like to use Helm templating to create the volumes / volumeMounts instead of hand jamming the names into a values file.
Current
The helm template performs a toYaml for volumes, volumeMounts, and initcontainers. This restricts these items to literal values only.
Proposal
Use tpl to allow the values to be either literal or a Helm template. Example:
{{- with .Values.volumeMounts -}}{{- tpl (ternary . (toYaml .) (kindIs "string" .)) $ | trim | nindent 4 -}}{{- end -}}
This would allow literals...
volumeMounts:
- name: myvolmountPath: /tmp/myvol
arrays with Helm...
volumeMounts:
- name: {{ include "fluentd.myvol.name" . }}mountPath: /tmp/myvol
or a Helm template string...
volumeMounts: |- {{- range $path, $_ := $.Files.Glob "myfiles/*.conf" -}} - name: {{ include "fluend.myvol.name" (base $path) }} mountPath: /tmp/myvol {{ end -}}
Other
This technique could be extended to other values in the future if a use case is presented
The text was updated successfully, but these errors were encountered:
Use cases
Current
The helm template performs a
toYaml
for volumes, volumeMounts, and initcontainers. This restricts these items to literal values only.Proposal
Use tpl to allow the values to be either literal or a Helm template. Example:
This would allow literals...
arrays with Helm...
or a Helm template string...
Other
This technique could be extended to other values in the future if a use case is presented
The text was updated successfully, but these errors were encountered: