-
Notifications
You must be signed in to change notification settings - Fork 196
Invalid prerelease Semantic Version string used by EKS #512
Description
What happened:
I tried to install a Helm chart into EKS which had a version requirement like:
kubeVersion: ">= 1.19.0"
This returned an error:
Error: chart requires kubeVersion: >= 1.19.0 which is incompatible with Kubernetes v1.20.7-eks-d88609
What you expected to happen:
I expected the chart to install since the kubernetes version is nominally supported.
How to reproduce it (as minimally and precisely as possible):
$ helm create foo
Creating foo
$ echo 'kubeVersion: ">= 1.19.0"' >> foo/Chart.yaml
$ helm --kube-version=1.20.0-eks-123 template foo
Error: chart requires kubeVersion: >= 1.19.0 which is incompatible with Kubernetes v1.20.0-eks-123
Use --debug flag to render out invalid YAML
Anything else we need to know?:
The problem is that the practice of appending -eks-* to the version returned by the kubernetes API is not correct according to Semantic Versioning. A hyphen-appended suffix indicates a prerelease version. For build metadata like the eks suffix on a production release version, a + should be used: 1.20.0+eks-123. See SemVer spec items 9 and 10.
Demonstrating that this works using the test case above:
$ helm --kube-version=1.20.0+eks-123 template foo
...
There is further discussion here: helm/helm#3810
Environment:
- EKS Distro Release Channel: n/a
- EKS Distro Release: v1.20.7-eks-d88609