kuberneteskubernetes-helmconfigmap

how to access certain dotted value in helm ConfigMap


i want to access dotted named value with helm to use in ConfigMap the value is something like that

valuenum:
  joji.json: zok

i want to use it in ConfigMap with helm as this

{{ toYaml .Values.valuenum.joji.json }}

it returns syntax error. could not find a fix for it.


Solution

  • I found the answer myself, when using index we can search for nested variables with quotes.

    {{ index .Values.valuenum "joji.json" }}
    

    link for helm doc about index and more