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
{{- /*
linux-shared.util.merge will merge two YAML templates and output the result.
This takes an array of three values:
- the top context
- the template name of the overrides (destination)
- the template name of the base (source)
*/}}
{{- define "linux-shared.util.merge" -}}
{{- $top := first . -}}
{{- $overrides := fromYaml (include (index . 1) $top) | default (dict ) -}}
{{- $tpl := fromYaml (include (index . 2) $top) | default (dict ) -}}
{{- toYaml (merge $overrides $tpl) -}}
{{- end -}}
The text was updated successfully, but these errors were encountered:
the macro is assuming '.' has Values at the range, but then your passing a list:
(list $ "linux-httpd.configmap")
which has no .Values, so range is probably skipping over it?
the macro is assuming '.' has Values at the range, but then your passing a list: (list $ "linux-httpd.configmap") which has no .Values, so range is probably skipping over it?
No idea to be honest. I just followed documentation. The first item from range is rendered properly thought.
Hello,
I have pretty much the same issue as described here:
https://stackoverflow.com/questions/77352107/cant-use-range-inside-library-chart-defined-template-in-helm
I have created a simple library chart following the documentation here: https://helm.sh/docs/topics/library_charts/#create-a-simple-library-chart
_configmap.yaml:
I want to create multiple ConfigMaps based on list variable in values.yaml:
In a chart I include this library in configmap.yaml:
I would expect 2 ConfigMap objects to be created but only the first one is. On other hand if I change configmap.yaml to:
then it works as expected. But I would also like to use the "merge" functionality mentioned in documentation.
Would appreciate any help. Thank you.
helm version:
version.BuildInfo{Version:"v3.15.0-rc.2", GitCommit:"c4e37b39dbb341cb3f716220df9f9d306d123a58", GitTreeState:"clean", GoVersion:"go1.22.3"}
_util.tpl:
The text was updated successfully, but these errors were encountered: