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

Migrate vSphere CSIDriver resource on upgrade to match upstream #12813

Merged
merged 6 commits into from
Nov 6, 2023

Conversation

embik
Copy link
Member

@embik embik commented Nov 3, 2023

What this PR does / why we need it:

Settle down kids because this story might take a while.

Long back, #7280 added support for vSphere external CCM and CSI driver. CSI support was based on the 2.2.1 release of vsphere-csi-driver. For some reason that has been lost to history and the unwillingness to write proper PR descriptions, the original PR set volumeLifecycleModes on the CSIDriver resource. This was not set in the corresponding upstream manifests for v2.2.1, and I cannot find any meaningful references to volumeLifecycleModes in the upstream or k8c issue trackers.

We have run into this exact problem (as described in #12801) once already: #8769 reverted settings to ensure that the CSIDriver object could be reconciled. I also don't see any reason why this needs to be set in those PRs, I suspect it was done simply because of the exact same error this PR is now trying to solve permanently.

#12593 then upgraded the CSI driver to 3.0, and removed the volumeLifecycleModes settings from the CSIDriver again because the change was not documented and not matching upstream manifests.

I've done some additional research and believe that the CSI driver does not support ephemeral volumes (which is indicated by Ephemeral in volumeLifecycleModes), so the old CSIDriver object is incorrect.

This PR adapts logic implemented in #12432 to also clean up the vSphere CSIDriver object to allow redeployment.

Which issue(s) this PR fixes:

Fixes #12801

What type of PR is this?
/kind bug
/kind regression
/kind cleanup

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

Migrate `CSIDriver` `csi.vsphere.vmware.com` to no longer advertise inline ephemeral volumes as supported

Documentation:

NONE

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@embik embik added this to the KKP 2.24 milestone Nov 3, 2023
@embik embik self-assigned this Nov 3, 2023
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. kind/regression Categorizes issue or PR as related to a regression from a prior release. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 3, 2023
@embik
Copy link
Member Author

embik commented Nov 3, 2023

/test pre-kubermatic-e2e-vsphere-ubuntu-1.28

Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@embik
Copy link
Member Author

embik commented Nov 3, 2023

/test pre-kubermatic-e2e-vsphere-ubuntu-1.28

Copy link
Contributor

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold

feel free to unhold if those nits are irrelevant

@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 Nov 4, 2023
@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 93a93895b3e16b55a8df2751dab2436d2280c835

@embik
Copy link
Member Author

embik commented Nov 6, 2023

/hold cancel

Since there's no full approval yet anyway.

@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 Nov 6, 2023
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@kubermatic-bot kubermatic-bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2023
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Copy link
Contributor

@xrstf xrstf left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 06c6b9066de83b283c7d4ed124fc7ab8675a3e8f

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wozniakjan, xrstf

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 Nov 6, 2023
@embik embik added the code-freeze-approved Indicates a PR has been approved by release managers during code freeze. label Nov 6, 2023
@kubermatic-bot kubermatic-bot removed the do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. label Nov 6, 2023
@kubermatic-bot kubermatic-bot merged commit 050a231 into kubermatic:main Nov 6, 2023
19 checks passed
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. code-freeze-approved Indicates a PR has been approved by release managers during code freeze. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/regression Categorizes issue or PR as related to a regression from a prior release. 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. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. 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.

CSIDriver "csi.vsphere.vmware.com" causes CSI addon reconciliation to fail
4 participants