profile
viewpoint

Ask questionshelm upgrade fails with spec.clusterIP: Invalid value: "": field is immutable

When issue helm upgrade, it shows errors like, ("my-service" change from "clusterIP: None" to "type: LoadBalancer" without field clusterIP)

Error: UPGRADE FAILED: Service "my-service" is invalid: spec.clusterIP: Invalid value: "": field is immutable 

However, all other pods with new version are still going to be restarted, except that "my-service" Type does not change to new type "LoadBalancer"

I understand that why upgrade failed because helm does not support changing on some certain fields. But why helm still upgrades other services/pods by restarting it. Should helm does nothing if there is any error during the upgrade? I excepted helm to treat the whole set of services as a package to either upgrade all or none, but seems my expectation might be wrong.

And if we ever end up in such situation, then what we should to get out the situation? like how to upgrade "my-service" to have new type?

And if I use --dry-run option, helm does not show any errors.

Is this consider a bug or expected, i.e. upgrade throws some error but some service still gets upgraded.

<!-- If you need help or think you have found a bug, please help us with your issue by entering the following information (otherwise you can delete this text): -->

Output of helm version:

Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.10-gke.27", GitCommit:"145f9e21a4515947d6fb10819e5a336aff1b6959", GitTreeState:"clean", BuildDate:"2020-02-21T18:01:40Z", GoVersion:"go1.12.12b4", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): GKE and Minkube

helm/helm

Answer questions technosophos

Oh! That is interesting. That should make the error easier to track down.

useful!

Related questions

Error: open .helm\repository\cache\local-index.yaml hot 2
Helm upgrade fails the release after adding a new resource hot 2
Error: validation: chart.metadata is required when using --repo - helm hot 2
Error: could not find a ready tiller pod hot 2
Upgrading releases with immutable resources (e.g. persitentVolume) hot 2
"Error: Transport is closing" message when attempting to install hot 1
helm 3: Not able to push chart to docker hub hot 1
Helm3: No 'init', doesn't use existing ~/.helm hot 1
No kind Job is registered for version batch/v1 hot 1
error calling eq: invalid type for comparison hot 1
upgrade apiVersion in k8s from 1.14 to 1.16 FAILED hot 1
Helm v 2.9.1 Error: Can&#39;t get a valid version for repositories even when the chart is available - helm hot 1
Upgrades fails with: grpc: received message larger than max hot 1
Helm init fails on Kubernetes 1.16.0 hot 1
Helm error with forwarding ports hot 1
Github User Rank List