Skip to content
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

Correctly interpret .Capabilities.KubeVersion when it looks like a prerelease #457

Merged
merged 1 commit into from May 5, 2023

Conversation

kd7lxl
Copy link
Collaborator

@kd7lxl kd7lxl commented May 4, 2023

What this PR does:
The chart uses semverCompare to interpret .Capabilties.KubeVersion. semverCompare by default will ignore prereleases. A Kubernetes prerelease will still support the newer API versions targeted for that release, so the chart should allow prereleases when doing version comparisons.

Moreover, popular Kubernetes releases such as AWS EKS [improperly] use prerelease annotation in their version strings, like 1.25.8-eks-ec5523e, so this issue could cause incorrect API versions to be selected on those clusters.

semverCompare supports allowing prereleases by adding -0 to the operand, like >=1.21-0.

This PR adds -0 to the version comparison so that versions that look like prereleases are supported.

References:

Which issue(s) this PR fixes:
Fixes #160

Checklist

  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

…erelease

Signed-off-by: Tom Hayward <thayward@infoblox.com>
@nschad nschad enabled auto-merge (squash) May 5, 2023 07:30
@nschad nschad merged commit 3aedcde into cortexproject:master May 5, 2023
2 checks passed
@kd7lxl kd7lxl deleted the semver branch May 5, 2023 21:28
@locmai locmai mentioned this pull request Jan 16, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SemVar isn't working in v1.18.9-eks-d1db3c
2 participants