I've a helm chart with attribute 2darrayIPs. This attribute takes value from values.yaml file which inturn is given via helm installation command
helm-chart/templates/main.yaml
2darrayIPs: {{ .Values.2darrayIPs }}
helm-chart/values.yaml
2darrayIPs: [[]] -- empty array, this value is given via installation command
I'm passing 2d array via helm command while installing helm chart.
helm install ..... -f val.yaml
val.yaml
2darrayIPs:
- - 1.1.1.1
- 2.2.2.2
- - 3.3.3.3
- 4.4.4.4
I'm getting this error while installing helm chart:
Error: YAML parse error on templates/main.yaml: error converting YAML to JSON: yaml: did not find expected ',' or ']'
If I give one array as given below, the installation is successful but in my logs I get a single array with only one value instead of two:
[[1.1.1.1 2.2.2.2]]
val.yaml
2darrayIPs:
- - 1.1.1.1
- 2.2.2.2
Where am I going wrong?