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

Block vSphere on K8s 1.22 #7590

Merged
merged 15 commits into from
Sep 2, 2021

Conversation

mlavacca
Copy link
Contributor

@mlavacca mlavacca commented Aug 26, 2021

What this PR does / why we need it:
Since the necessity to block Kubernetes v1.22 on vSphere emerged under certain specific scenarios, this PR aims at implementing a generally available mechanism to block unwanted Kubernetes versions without the need to write custom code in the API server. The extra-files secret (where versions.yaml and updates.yaml reside) has been improved by introducing a new file: provider-incompatibilities.yaml, whose structure is the following:

providerIncompatibilities:
- condition: always
  operation: CREATE
  provider: vsphere
  version: 1.22.*
- condition: externalCloudProvider
  operation: UPDATE
  provider: vsphere
  version: 1.22.*

Below are the parameters' details:

  • condition: the condition that the cluster must match to trigger the incompatibility (e.g., the cluster using the external CCM)
  • operation: the operation to be applied in (creation of a new cluster or update of an existing one)
  • provider: the provider to which to apply the block
  • version: the Kubernetes version to block (wildcards are allowed)

The conditions can be improved in the future, every field about the cluster or the datacenter is allowed (it's just a matter of a couple of lines of code).
Adding and removing constraints is very simple by using this mechanism: when in the future we'll allow using 1.22 clusters on vSphere, it will be enough to delete the above rules from the defaults.go file, without dealing with ad-hoc conditions embedded in the core code.

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 #7578

Special notes for your reviewer:

Documentation:

Does this PR introduce a user-facing change?:

NONE

@kubermatic-bot kubermatic-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. sig/api Denotes a PR or issue as being assigned to SIG API. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 26, 2021
@xrstf
Copy link
Contributor

xrstf commented Aug 29, 2021

/retest

@kubermatic-bot kubermatic-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 30, 2021
@mlavacca mlavacca force-pushed the block-vsphere-v1.22 branch 2 times, most recently from 2ec468a to 663df82 Compare August 30, 2021 17:07
@kubermatic-bot kubermatic-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 30, 2021
@mlavacca mlavacca changed the title [WIP] Block vSphere on K8s 1.22 Block vSphere on K8s 1.22 Aug 31, 2021
@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 Aug 31, 2021
@mlavacca
Copy link
Contributor Author

/assign @xmudrii

@mlavacca
Copy link
Contributor Author

/retest

pkg/provider/types.go Outdated Show resolved Hide resolved
@xrstf
Copy link
Contributor

xrstf commented Sep 2, 2021

/hold

temporarily. I'm doing something on CI. Nothing to worry about.

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 2, 2021
@xrstf
Copy link
Contributor

xrstf commented Sep 2, 2021

/hold cancel

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 2, 2021
@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-triage-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

@kubermatic-bot
Copy link
Contributor

@kubermatic-triage-bot: cat image

In response to this:

/retest
This bot automatically retries jobs that failed/flaked on approved PRs

Review the full test history

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Also, here is a cat.
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
@kubermatic-bot kubermatic-bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2021
@mlavacca
Copy link
Contributor Author

mlavacca commented Sep 2, 2021

@xmudrii LGTM lost after rebase (there was a conflict). Could you lgtm again please?

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2021
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 6f04bee4e7d608be01470bdef17b84d7c8f64c84

@kubermatic-bot kubermatic-bot merged commit 9ac4613 into kubermatic:master Sep 2, 2021
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-none Denotes a PR that doesn't merit a release note. sig/api Denotes a PR or issue as being assigned to SIG API. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block Kubernetes cluster 1.22 on vSphere
6 participants