Helm is failing when upgrading a chart that contains a new sub-chart
e.g.:
chart
/templates
/charts
/sub-1
values.yaml
Now this chart get's updated, and a new sub-chart is added, which contains a configmap etc..
chart
/templates
/charts
/sub-1
/sub-2
/templates
configmap.yaml #config
values.yaml
When we run helm upgrade <release> <chart> --install we keep getting:
Error: UPGRADE FAILED: no ConfigMap with the name "config" found
My guess is that helms tries to diff it with the 'previous' version of config but it does not yet exist. And thus the error. However, how could I make this work without deleting and re-installing the chart. This is not optimal for production scerarios.
I would just create a blank ConfigMap in whichever Kubernetes namespace you are installing your Chart.
$ kubectl -n <namespace> create cm configIf for reason it complains about the data field or another field not being available you can always create a dummy one:
$ kubectl -n <namespace> edit cm configor
$ kubectl -n <namespace> patch cm config -p '{"data": {"dummy": "dummy1"}}'