How to load file contents into a dict in helm
@himmakam Some suggestions in https://github.com/helm/helm/issues/8020 and https://stackoverflow.com/questions/55345358/convert-yaml-string-to-dict-in-helm-template that might be worth trying.
@himmakam Example from @tamalsaha in https://github.com/helm/helm/issues/8020#issuecomment-648272488:
{{- $res := .Values.resources -}}
{{- $machines := .Files.Get "data/machines.yaml" | fromYaml -}}
{{- if and .Values.machine (hasKey $machines .Values.machine) }}
{{- $res := get (get $machines .Values.machine) "resources" }}
{{- end }}
There is a page in the docs on this at https://helm.sh/docs/chart_template_guide/accessing_files/. Does that help?
@himmakam Did you get this working as per the thread in #8020?
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Closing as answered.