-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Bug: field is immutable. Helm respond UPGRADE FAILED but work well #5006
Description
Output of helm version:
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-09T21:51:06Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2+IKS", GitCommit:"3bc954c21047d69ff5ae0c6381f1615cfa7040f5", GitTreeState:"clean", BuildDate:"2018-11-20T10:08:54Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
For deployment template I use apiVersion: apps/v1beta2 which implement immutable selector.
And if you add or delete from deployment template filed in selector block which immutable and after that try to do helm upgrade --install --force --wait.
I get:
Cannot patch Deployment: "imap-stage" (Deployment.apps "imap-stage" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"imap", "release":"imap-stage"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable)
Because i use --force Deployment will deleted and recreated, tiller:
2018/12/04 03:34:54 Deleted Deployment: "imap-stage"
2018/12/04 03:34:54 Created a new Deployment called "imap-stage"
[kube] 2018/12/04 03:34:54 beginning wait for 4 resources with timeout of 5m0s
[kube] 2018/12/04 03:34:56 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:34:58 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:00 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:02 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:04 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:06 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:08 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:10 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:12 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:14 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:16 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:18 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:20 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:22 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:24 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:26 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:28 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:30 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:32 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:34 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:36 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:38 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:40 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:42 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:44 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:46 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:48 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:50 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:52 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:54 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:56 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:35:58 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:00 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:02 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:04 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:06 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:08 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:10 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:12 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:14 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:16 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:18 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:20 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:22 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:24 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:26 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:28 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:30 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:32 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:34 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:36 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:38 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:40 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:42 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:44 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:46 Deployment is not ready: stage/imap-stage
[kube] 2018/12/04 03:36:48 Deployment is not ready: stage/imap-stage
[tiller] 2018/12/04 03:36:50 executing 0 post-upgrade hooks for imap-stage
[tiller] 2018/12/04 03:36:50 hooks complete for post-upgrade imap-stage
But helm respond me that:
Error: UPGRADE FAILED: timed out waiting for the condition
although, Helm will successfully deployed new helm chart but my CI will get error