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

Use semver constraints on Kubernetes version for upper and lower bounds #1808

Merged
merged 6 commits into from
Feb 7, 2022

Conversation

embik
Copy link
Member

@embik embik commented Feb 4, 2022

What this PR does / why we need it:

This adds validation against two semver constraints that can easily be bumped from the top of the file when adding new Kubernetes versions.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1807

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Validate Kubernetes version against supported versions constraints

Signed-off-by: Marvin Beckers marvin@kubermatic.com

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 4, 2022
@embik embik requested review from xmudrii and kron4eg February 4, 2022 14:38
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@embik embik marked this pull request as draft February 4, 2022 14:45
@kubermatic-bot kubermatic-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 4, 2022
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@embik
Copy link
Member Author

embik commented Feb 4, 2022

/test pull-kubeone-lint

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@embik embik marked this pull request as ready for review February 4, 2022 15:12
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 4, 2022
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@embik
Copy link
Member Author

embik commented Feb 7, 2022

/retest

@kron4eg kron4eg self-assigned this Feb 7, 2022
@kron4eg kron4eg added this to the KubeOne 1.4 milestone Feb 7, 2022
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

admitting this to 1.4 release

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 7, 2022
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 774d3e80b73f2e5f0da5085d6e7910241dfbc150

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: embik, kron4eg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2022
@kubermatic-bot kubermatic-bot merged commit f026166 into kubermatic:master Feb 7, 2022
@xmudrii
Copy link
Member

xmudrii commented Feb 8, 2022

@kron4eg @embik Do we also want to cherry-pick this to the release/v1.3 branch?

@kron4eg
Copy link
Member

kron4eg commented Feb 8, 2022

I'm not sure, most likely no since that would be an unexpected novelty in 1.3.

@embik
Copy link
Member Author

embik commented Feb 8, 2022

I agree with @kron4eg, it's unexpected in a patch release for 1.3. IMHO it should not be cherry-picked. It's "just" codifying the "contract" we already have in place through the support documentation.

embik added a commit to embik/kubeone that referenced this pull request Feb 8, 2022
…ds (kubermatic#1808)

* Use semver constraints on Kubernetes version for upper and lower bounds

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Fix linting issues

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Improve constraint usage and correctly append errors

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Use mustParseConstraint

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Fix test case

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Appease linter

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
kubermatic-bot pushed a commit that referenced this pull request Feb 8, 2022
… and lower bounds (#1817)

* Use semver constraints on Kubernetes version for upper and lower bounds (#1808)

* Use semver constraints on Kubernetes version for upper and lower bounds

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Fix linting issues

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Improve constraint usage and correctly append errors

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Use mustParseConstraint

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Fix test case

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Appease linter

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>

* Adjust version constraints to v1.3 branch

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail validation for unsupported newer Kubernetes versions
4 participants