You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Helm rejects version numbers with build info that are valid according to the SemVer 2 standard #1698
I'm building a Continuous Deployment pipeline. As such, I want charts/packages to include the git commit hash in their version; incrementing chart version numbers is less meaningful.
Helm however does not support this part of the SemVer 2 standard:
Error: UPGRADE FAILED: Service "tracereader" is invalid: [metadata.labels: Invalid value: "tracereader-1.0.0+a056a76": must match the regex (([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])? (e.g. 'MyValue' or 'my_value' or '12345')
changed the title [-]Helm rejects version numbers that are valid according to the SemVer 2 standard[/-][+]Helm rejects version numbers with build info that are valid according to the SemVer 2 standard[/+]on Dec 16, 2016
I don't think this is directly related to SemVer so much as to a constraint on Kubernetes manifest file content.
That error is Kubernetes complaining that + is an invalid string in a metadata.label value. I didn't know + was illegal in a value. Can you paste in here the metadata.labels section of whatever resource that is?
I ran into the same problem.
But you have access to that file. So you could set something else as label. For example strip the metadata from the semvar since it is not a distinguishing part of the version anyway.
Activity
itamarst commentedon Dec 16, 2016
As a workaround I used prerelease versions (
1.0.0-a056a76) instead of build versions (1.0.0+a056a76).[-]Helm rejects version numbers that are valid according to the SemVer 2 standard[/-][+]Helm rejects version numbers with build info that are valid according to the SemVer 2 standard[/+]technosophos commentedon Dec 16, 2016
I don't think this is directly related to SemVer so much as to a constraint on Kubernetes manifest file content.
That error is Kubernetes complaining that
+is an invalid string in ametadata.labelvalue. I didn't know+was illegal in a value. Can you paste in here themetadata.labelssection of whatever resource that is?itamarst commentedon Dec 19, 2016
Problem is that the default Helm chart structure embeds versions in the metadata, I guess:
ralf-cestusio commentedon Jan 6, 2017
I ran into the same problem.
But you have access to that file. So you could set something else as label. For example strip the metadata from the semvar since it is not a distinguishing part of the version anyway.
technosophos commentedon Jan 11, 2017
I think maybe we should change the default chart to do something like
{{ .Chart.Version | replace "+" "_" }}. I'm adding this as a bug fix for 2.1.4./cc @prydonius
technosophos commentedon Jan 11, 2017
To be more specific, this is just a change to the
defaultDeploymentanddefaultServiceconstants at the top ofpkg/chartutil/create.golachie83 commentedon Jan 11, 2017
I'm willing to pick this up
do not handle the metadata segment as it's not supported in helm char…
do not handle the metadata segment as it's not supported in helm char…
Fix incorrect chart bug in multi-cluster setup (helm#1698)