map passed to empty Values variable by --set with helm --upgrade will be ignored

7/2/2018

I am currently trying to pass a map via helm upgrade --set mymap.value=xyz ... to an empty value variable as following:

Values file:

(...)
myMap:

Executing the helm upgrade command is successful but states the following error: warning: skipped value for myMap: Not a table.

If I fill the Values file with a dummy map like

(...)
myMap:
   dummy:

then it is working and overwrites the whole map, deleting the existing dummy node.

This behavior cost me quite some time not realizing, that an empty list will be accepted but doing exactly the same with an empty map will not. I therefore just wanted to ask if this behavior is intended or if this is a bug that should be adressed.

-- Max R.
kubernetes-helm

1 Answer

7/2/2019

As yaml is always valid json, it is possible to use map: {}, array: [] for empty typed values.

-- Max R.
Source: StackOverflow