-
Notifications
You must be signed in to change notification settings - Fork 7.4k
fix: k8s version parsing to match original #31078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Borys Hulii <[email protected]>
@mattfarina you want this one or you want me to get it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When Helm initially setup this handling, a long time ago, Kubernetes used semver. Kubernetes has changed so Helm needs to change accordingly.
I think this could be backported for v3, as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mattfarina should I create a separate PR into the |
Yes |
What this PR does / why we need it:
The semver validation is not compatible with what k8s itself uses.
Here is an example of the version response from the kube api:
The version is compiled as
1.28+
. This type of version format is used by AWS EKS and considered valid according to the version validator in k8s.When the same version is parsed into
helm template
ofhelm lint
, it is being validated with ParseKubeVersion which uses the github.com/Masterminds/semver/v3 package.The Masterminds/semver package does not support trailing
+
symbol and upon command run, it throws theInvalid Semantic Version
error.Adresses the #31063
Special notes for your reviewer:
If applicable:
docs needed
label should be applied if so)