# Problem deploying helm chart with array of hash for values

**URL:** <https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459>\
**Category:** SUSE Rancher Prime\
**Created:** [February 26, 2019, 4:03pm UTC](https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459 "2019-02-26T16:03:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarush](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jarush](https://forums.suse.com/u/jarush)\
**Post date:** [February 26, 2019, 4:03pm UTC](https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459/1 "2019-02-26T16:03:19Z")

</div>

I’m trying to specify an array of hashes when deploying a helm chart. The yaml looks like this:  
myvals:  
- name: thefirsthost  
token: apitoken1  
- name: thesecondhost  
token: apitoken2

If I only specify a few of them, I only get the below error for about a minute, and then it goes away and everything works fine. If I drop in 20+, the error never goes away. It seems like the number of errors thrown grows exponentially as I add elements. I’m trying to specify this as key=values in rancher like so:

- myvals[0].name=thefirsthost
- myvals[0].token=apitoken1
- myvals[1].name=thesecondhost
- myvals[1].token=apitoken2

It feels like the error below is telling me that myvals[0] is null and therefore I can’t access the .name and .token attributes. That makes sense, but I can’t think of another way to specify the overrides in rancher.

Helm template failed. panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 1 [running]: [k8s.io/helm/pkg/strvals.(\*parser](http://k8s.io/helm/pkg/strvals.(*parser)).listItem(0xc4209537a0, 0xc42091dea0, 0x7, 0x7, 0x3, 0x1, 0x5b, 0x0, 0x0, 0x0)  
(there is a slew of other go mess at the end, but the rancher forum isn’t letting me paste it in.

---

<div class="post-metadata">

**Author:** ![jarush](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jarush](https://forums.suse.com/u/jarush)\
**Post date:** [February 27, 2019, 8:33pm UTC](https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459/2 "2019-02-27T20:33:31Z")

</div>

Helm template failed. panic: interface conversion: interface {} is nil, not map[string]interface {} goroutine 1 [running]: [k8s.io/helm/pkg/strvals.(\*parser](http://k8s.io/helm/pkg/strvals.(*parser)).listItem(0xc4209537a0, 0xc42091dea0, 0x7, 0x7, 0x3, 0x1, 0x5b, 0x0, 0x0, 0x0) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/pkg/strvals/parser.go:247 +0xe07 [k8s.io/helm/pkg/strvals.(\*parser](http://k8s.io/helm/pkg/strvals.(*parser)).key(0xc4209537a0, 0xc420903950, 0x0, 0x0) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/pkg/strvals/parser.go:141 +0xb69 [k8s.io/helm/pkg/strvals.(\*parser](http://k8s.io/helm/pkg/strvals.(*parser)).parse(0xc4209537a0, 0xc42091de30, 0x219) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/pkg/strvals/parser.go:97 +0x38 [k8s.io/helm/pkg/strvals.ParseInto](http://k8s.io/helm/pkg/strvals.ParseInto)(0x7ffc63112549, 0x219, 0xc420903950, 0x7ffc631124f5, 0x1f) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/pkg/strvals/parser.go:71 +0xbe main.vals(0x0, 0x0, 0x0, 0xc4202c5b40, 0x1, 0x1, 0x20f3490, 0x0, 0x0, 0x20cfbc0, …) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/cmd/helm/install.go:364 +0x3d0 main.(\*templateCmd).run(0xc42091e0e0, 0xc4209386c0, 0xc42091ddc0, 0x1, 0x7, 0x0, 0x0) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/cmd/helm/template.go:154 +0x618 main.(\*templateCmd).(main.run)-fm(0xc4209386c0, 0xc42091ddc0, 0x1, 0x7, 0x0, 0x0) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/cmd/helm/template.go:90 +0x52 [k8s.io/helm/vendor/github.com/spf13/cobra.(\*Command](http://k8s.io/helm/vendor/github.com/spf13/cobra.(*Command)).execute(0xc4209386c0, 0xc42091dd50, 0x7, 0x7, 0xc4209386c0, 0xc42091dd50) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/vendor/github.com/spf13/cobra/command.go:599 +0x3db [k8s.io/helm/vendor/github.com/spf13/cobra.(\*Command](http://k8s.io/helm/vendor/github.com/spf13/cobra.(*Command)).ExecuteC(0xc420804240, 0xc4209386c0, 0xc420938900, 0xc420938b40) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/vendor/github.com/spf13/cobra/command.go:689 +0x2d4 [k8s.io/helm/vendor/github.com/spf13/cobra.(\*Command](http://k8s.io/helm/vendor/github.com/spf13/cobra.(*Command)).Execute(0xc420804240, 0x8, 0x8) /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/vendor/github.com/spf13/cobra/command.go:648 +0x2b main.main() /home/darren/.gpath/3ef6bc96094c0cb608fe5ee0babfa6c6abd39686/src/k8s.io/helm/cmd/helm/helm.go:160 +0x75 : exit status 2

---

<div class="post-metadata">

**Author:** ![sishihara](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@sishihara](https://forums.suse.com/u/sishihara)\
**Post date:** [May 7, 2019, 10:57am UTC](https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459/3 "2019-05-07T10:57:51Z")

</div>

I’ve got same error in Rancher v2.1.8 / Rancher-CLI v2.2.0. Is there any workarounds?

---

<div class="post-metadata">

**Author:** ![jarush](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jarush](https://forums.suse.com/u/jarush)\
**Post date:** [May 7, 2019, 12:46pm UTC](https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459/4 "2019-05-07T12:46:03Z")

</div>

The only “workaround” is to hardcode your values into the questions.yaml or values.yaml. I’ve mostly done questions yaml - took the approach of having only a a couple of questions for the person to answer - like “environment” = PRD, QA, DEV. And from that answer, i just assume the values they want. Would love a better workaround.

---

<div class="post-metadata">

**Author:** ![dnoland](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/dnoland/32/4710_2.png) [@dnoland](https://forums.suse.com/u/dnoland)\
**Post date:** [May 21, 2019, 4:09pm UTC](https://forums.suse.com/t/problem-deploying-helm-chart-with-array-of-hash-for-values/13459/5 "2019-05-21T16:09:02Z")

</div>

Rancher team is working on a fix for this. See [https://github.com/rancher/rancher/issues/20310](https://github.com/rancher/rancher/issues/20310)
