✨ vsphereparavirtual: Support multiple VM Operator API versions#1713
Conversation
|
/hold |
040ec69 to
4267c7e
Compare
|
/test pull-cloud-provider-vsphere-verify-fmt |
2db282c to
403a692
Compare
97faa77 to
1e77192
Compare
1e77192 to
5ea0ae4
Compare
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
The overlap is intentional to a degree: each API version uses distinct generated types from vm-operator/api, so we keep a thin adapter per version that maps to our stable hub types. |
|
/rebase |
33a74ff to
c01c8fc
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.
c01c8fc to
8425768
Compare
8425768 to
ca7b33a
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DanielXiao, 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 |
|
/retest |
|
/unhold |
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.