When trying to upgrade to the latest version of the chart, I got the following error:
$ helm upgrade kubeapps bitnami/kubeapps --set mongodb.mongodbRootPassword=$MONGODB_ROOT_PASSWORD
Error: UPGRADE FAILED: Deployment.apps "kubeapps-mongodb" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"mongodb", "release":"kubeapps"}: `selector` does not match template `labels`
The issue is due to a bug in the MongoDB chart that used a mutable label as a selector. To get around this, you need to delete the MongoDB deployment and re-run the upgrade:
$ kubectl delete deploy -n kubeapps kubeapps-mongodb
$ helm upgrade $RELEASE_NAME bitnami/kubeapps --set mongodb.mongodbRootPassword=$MONGODB_ROOT_PASSWORD
Release "kubeapps" has been upgraded. Happy Helming!
This will delete chart data that was stored in MongoDB, so you'll also need to log back into Kubeapps and refresh all the chart repositories to view charts again.
Filing this here in case others run into this when upgrading.
Great workaround! For the record, what has worked for me as well is to use the flag --force when upgrading.
Since the new chart already define the selector, should we close this issue? AFAIK there is no actionable item here.
Most helpful comment
Since the new chart already define the selector, should we close this issue? AFAIK there is no actionable item here.