helm: Helm install v2.14.0 "validation failed" error when using a template variable with value ""
Hello,
After upgrading from v2.13.1 to v2.14.0, my chart now throws an error on helm install:
Error: validation failed: error validating “”: error validating data: unknown object type “nil” in Deployment.spec.template.metadata.annotations.buildID
This seems to be due to the use in deployment.yaml file of a template variable “buildID” that is actually never declared in values.yaml. Extract from deployment.yaml:
template:
metadata:
labels:
app: {{ template "gateway.name" . }}
draft: {{ default "draft-app" .Values.draft }}
release: {{ .Release.Name }}
annotations:
buildID: {{ .Values.buildID }}
If I set the buildID variable in values.yaml file to “”, I get the same error. If I set the buildID variable in values.yaml file to any other string, such as “a”, then my install works. If I set “” to buildID in deployment.yaml (buildID: {{ “” }}), I get the same error. If I set “” directly to buildID in deployment.yaml (buildID: “”), then my install works.
Could you please let me know if this is a known issue, or if I am missing anything here?
Thanks!
Output of helm version:
Client: &version.Version{SemVer:“v2.14.0”, GitCommit:“05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0”, GitTreeState:“clean”}
Server: &version.Version{SemVer:“v2.14.0”, GitCommit:“05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0”, GitTreeState:“clean”}
Output of kubectl version:
Client Version: version.Info{Major:“1”, Minor:“10”, GitVersion:“v1.10.11”, GitCommit:“637c7e288581ee40ab4ca210618a89a555b6e7e9”, GitTreeState:“clean”, BuildDate:“2018-11-26T14:38:32Z”, GoVersion:“go1.9.3”, Compiler:“gc”, Platform:“windows/amd64”}
Server Version: version.Info{Major:“1”, Minor:“12”, GitVersion:“v1.12.7”, GitCommit:“6f482974b76db3f1e0f5d24605a9d1d38fad9a2b”, GitTreeState:“clean”, BuildDate:“2019-03-25T02:41:57Z”, GoVersion:“go1.10.8”, Compiler:“gc”, Platform:“linux/amd64”}
Cloud Provider/Platform: AKS
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 37
- Comments: 61 (17 by maintainers)
Commits related to this issue
- Rollback Helm to v2.13.1 See: https://github.com/helm/helm/issues/5750 — committed to greenpeace/planet4-circleci by 27Bslash6 5 years ago
- Rollback to helm 2.13.1 because of https://github.com/helm/helm/issues/5750 — committed to ekreative/toolbox-docker by mcfedr 5 years ago
- Revert "Move to helm 2.14" There is a breaking change in helm 2.14.0 [0]. This is expected to be fixed in helm 2.14.1, reverting until we can update to that. [0]: https://github.com/helm/helm/issues... — committed to airshipit/armada by seaneagan 5 years ago
- Fix configmap validation enforced by Helm 3 See https://github.com/helm/helm/issues/5750 Signed-off-by: scottrigby <scott@r6by.com> — committed to codecademy-engineering/helm-charts by scottrigby 4 years ago
Wouldn’t the prudent course of action to surface validation errors that were ‘silently’ failing before, with a warning ,that in a future release becomes an error? Or at the least, honor a force flag or some such that allows the user to choose how to handle it?
Any idea when v2.14.1 will be available?
This bit me today as well.
Hello Team, We are facing this issue in the newly released v3 as well but not in the beta version v3.0.0-beta.4. Kindly help with the resolution.
KubeCon EU, which is next week, not November. 😃
I can try #5643 tomorrow unless someone beats me to it.
Helm v2.14.1 has been released: https://github.com/helm/helm/releases/tag/v2.14.1
We’re backing out this change and cutting 2.14.1.
@SeriousM With any helm client version, you can use
To get the latest helm client (master), you can use this : https://helm.sh/docs/using_helm/#from-canary-builds
For those that want to try the canary builds: https://helm.sh/docs/using_helm/#from-canary-builds
@fooka03 > Thanks for your reply! I didn’t understand previously that the fix would only apply to deployed charts being upgraded, and not new ones.
In my case unfortunately sticking to v2.13.1 isn’t an option either. 😦 The charts we created and that were working for v2.13.1 are provided to our users as part of a tool, and even though we would push a new version fixing this, we cannot force our users to use the latest version of our tool. Pushing a new version of the tool/charts might reduce the impact, but we’ll have in any case some of our users trying to install previous versions of our charts with Helm v2.14.0, and thus getting the validation error.
Even though I understand that my case is specific, isn’t this change going to also break some of the other charts that were generated previously (I’m thinking of https://github.com/helm/charts/tree/master/stable)?
If this is the case, would it be conceivable to postpone the validation change to Helm v3, and/or apply @StephanX’s suggestion above and display a warning for now?
this is still happening on
v3.2.4.v3.2.3works fine though.Thank you very much, I will try it out asap
Thank you @karuppiah7890 and @mitchellmaler Thanks for the tips! I remember I raised and issue to gitlab for autodevops. I will have to wait for the release of 2.4.1, don’t have the time right now to build a new pipeline 😦
@bacongobbler Sorry for the off-topic!
This worked for me, thanks very much
The pull-request https://github.com/helm/helm/pull/5760 disabling the validation has been merged to master by @bacongobbler (thanks!). I assume that, as mentioned by @fooka03, the version 2.14.1 won’t be available before a couple of days but I wanted to share the good news. 😃
So it looks like #5643 does fix the manifest validation issue:
Still have to set any missing validation fields in the “new” templates of course, but it will at least let you deploy over existing releases.
Can we get an ETA for the hotfix? I really would like to avoid patching my server with a self-build helm/tiller. Thank you!