migrate: adopt HCO v1 API throughout templates, code, and tests#187
Conversation
b427886 to
e3f91c1
Compare
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
e3f91c1 to
05c9c82
Compare
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
05c9c82 to
17c4261
Compare
17c4261 to
23260d4
Compare
The HCO CRD upstream update made v1 the storage version. With v1 as
storage, v1beta1-style fields (featureGates map, liveMigrationConfig at
spec root, spec.infra.nodePlacement) are structurally pruned on create,
breaking the 5 integration tests that depended on those paths.
Changes:
- pkg/context: set HCOVersion = "v1"
- pkg/controller: rewrite extractFeatureGates for v1 array format
[{name, state}] instead of v1beta1 map {key: bool}; add tests for
disabled gates and missing state
- templates: update dig paths to v1 layout
(spec.virtualization.liveMigrationConfig, spec.deployment.nodePlacements.infra)
- cmd, pkg/debug, pkg/util: update HCO apiVersion/GVK references to v1
- tests: use hco.kubevirt.io/v1 and v1 spec field paths throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
23260d4 to
2e81dbb
Compare
|
/approve |
|
@tiraboschi: you cannot LGTM your own PR. DetailsIn response to this:
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-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tiraboschi 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 |
01d4a2e
into
openshift-virtualization:main
Summary
v1beta1tov1across templates, Go code, and testsextractFeatureGatesfor the v1[{name, state}]array format (was v1beta1 map{key: bool})digpaths in templates to v1 spec layout (spec.virtualization.liveMigrationConfig,spec.deployment.nodePlacements.infra)make test-integrationtests caused by the HCO CRD upstream update making v1 the storage version (v1beta1-style fields are structurally pruned on create)Root cause
The upstream HCO CRD update promoted
v1to storage version. Without a conversion webhook in envtest, creating objects via the oldv1beta1API causes structural pruning: fields defined inv1beta1but not inv1(e.g.,spec.featureGatesas a map,spec.liveMigrationConfig) are silently dropped.Fix strategy
Adopt the v1 schema directly everywhere — templates read
spec.virtualization.liveMigrationConfigandspec.deployment.nodePlacements.infra, feature gates are parsed as[{name, state}]arrays, all test HCO objects useapiVersion: hco.kubevirt.io/v1.