🌱 vsphereparavirtual: Support multiple VM Operator API versions#1713
Open
silvery1622 wants to merge 1 commit intokubernetes:masterfrom
Open
🌱 vsphereparavirtual: Support multiple VM Operator API versions#1713silvery1622 wants to merge 1 commit intokubernetes:masterfrom
silvery1622 wants to merge 1 commit intokubernetes:masterfrom
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: silvery1622 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Collaborator
Author
|
/hold |
040ec69 to
4267c7e
Compare
Collaborator
Author
|
/test pull-cloud-provider-vsphere-verify-fmt |
2db282c to
403a692
Compare
DanielXiao
reviewed
Mar 23, 2026
pkg/cloudprovider/vsphereparavirtual/vmoperator/client/virtualmachine_client.go
Outdated
Show resolved
Hide resolved
DanielXiao
reviewed
Mar 23, 2026
DanielXiao
reviewed
Mar 23, 2026
pkg/cloudprovider/vsphereparavirtual/vmoperator/client/client.go
Outdated
Show resolved
Hide resolved
DanielXiao
reviewed
Mar 23, 2026
pkg/cloudprovider/vsphereparavirtual/vmoperator/client/virtualmachineservice_client.go
Outdated
Show resolved
Hide resolved
DanielXiao
reviewed
Mar 23, 2026
DanielXiao
reviewed
Mar 23, 2026
97faa77 to
1e77192
Compare
…a2, v1alpha5) Introduce a version-agnostic Hub Type / Hub Interface layer so that CPI business logic is decoupled from any specific VM Operator API version. The correct versioned adapter is selected at startup via the --vm-operator-api-version flag, enabling backward compatibility with Supervisor while supporting v1alpha5.
1e77192 to
5ea0ae4
Compare
DanielXiao
reviewed
Mar 26, 2026
Collaborator
DanielXiao
left a comment
There was a problem hiding this comment.
It seems massive code duplication between v1alpha2 and v1alpha5 adapters and providers, is it possible to a use shared generic helper package? In case we need to onboard v1alpha6, we need to implement the same duplicated code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Introduce a version-agnostic Hub Type / Hub Interface layer so that CPI business logic is decoupled from any specific VM Operator API version. The correct versioned adapter is selected at startup via the --vm-operator-api-version flag, enabling backward compatibility with Supervisor while supporting v1alpha5.
Which issue this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
N/A — new feature
Special notes for your reviewer:
dynamic.Interfaceis used instead of typed clients to avoid importing the full VM Operator API scheme into the CPI binary for each supported version.Release note:
vsphereparavirtual: add --vm-operator-api-version flag (default: v1alpha2) to select the VM Operator API version used when communicating with the Supervisor cluster. Supported values: v1alpha2, v1alpha5.