Reputation: 336
I have a Helm Chart that looks like this:
apiVersion: v1
name: my-app
version: 1.0-123.4b3k32
I am trying to use helm template (or lint, it doesn't matter, they both throw the same error). With helm2 this wasn't a problem, but with helm3, it is complaining that
Error: validation: chart.metadata.version "1.0-304.0770996" is invalid
Now when executing helm template, I want to override this value using
helm template --set chart.metadata.version='0.0.0'
but I keep getting the same error, what am I doing wrong here?
Changing it in the Chart itself is not an option. I tested by changing it manually to 0.0.0 to see if it works and it does. Setting it to 0.0.0 during templating would be fine for me.
Upvotes: 1
Views: 2284
Reputation: 158748
The Chart.yaml version:
field is specified to be a semantic version; quoting the Helm documentation, "non-SemVer names are explicitly disallowed by the system." SerVer's rule 2 is:
A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers....
So changing the chart version to 1.0.0-456.a1b2c3d
might resolve this problem. (SerVer rule 9 allows the -456...
suffix to indicate a pre-release version but all of its examples have three-part versions before the hyphen.)
There is no way to override these Chart.yaml
values with helm install
or related commands. In particular helm install --set
provides overrides to the values.yaml
file, what template code sees as .Values
.
Upvotes: 1