You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the cluster.x-k8s.io/v1beta2 contract label to CAPK's infrastructure CRDs
(KubevirtCluster, KubevirtClusterTemplate, KubevirtMachine, KubevirtMachineTemplate) via config/crd/kustomization.yaml, so that core Cluster API v1.13+ can recognize CAPK as
v1beta2-contract-compatible.
This is a metadata-only change, the same mechanism used to originally add the v1beta1 label:
No Go dependency bump, no controller code changes, and no change to the CRD's served/storage
API version (v1alpha1 remains the only served version). CAPK continues to watch and reconcile v1alpha1 resources exactly as before.
Which issue this PR fixes(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes#390
Special notes for your reviewer:
This is intentionally much narrower than the earlier v1beta2 effort in #328, which bumped the cluster-api Go module to v1.11 and updated CAPK's own condition types — that change broke
users still on CAPI v1.10 and was reverted in #361/#363.
This PR does not touch CAPK's dependencies or code at all; it only adds a contract label so that
core CAPI's Cluster/topology controllers can resolve infrastructureRef/controlPlaneRef
lookups when a Cluster is created with apiVersion: cluster.x-k8s.io/v1beta2. Because the
underlying CRD API version is unchanged, this should be safe for users on any CAPI version,
including those still on v1beta1/v1.10.
Verified locally:
kustomize build config/crd shows cluster.x-k8s.io/v1beta2: v1alpha1 on all 4 CRDs.
Applied the patched CRDs to a live management cluster running CAPI v1.13.4 + this CAPK
controller (v0.11.2, unmodified). Created a scratch Cluster (apiVersion: cluster.x-k8s.io/v1beta2) referencing KubevirtCluster via the new infrastructureRef.apiGroup
style. The core CAPI controller correctly resolved the contract, set ownerReferences[].apiVersion: cluster.x-k8s.io/v1beta2 on the KubevirtCluster, and began
reconciling normally (no "contract not found"/CRD lookup errors). capk-controller-manager
remained healthy and unaffected throughout.
Release notes:
Add `cluster.x-k8s.io/v1beta2` contract label to CAPK infrastructure CRDs, enabling Cluster API
v1beta2 Cluster resources to reference KubevirtCluster/KubevirtMachine as infrastructure providers.
This pull-request has been approved by: poussa Once this PR has been reviewed and has the lgtm label, please assign justinsb for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Details
Needs approval from an approver in each of these files:
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
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
cncf-cla: yesIndicates the PR's author has signed the CNCF CLA.size/XSDenotes a PR that changes 0-9 lines, ignoring generated files.
1 participant
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:
Adds the
cluster.x-k8s.io/v1beta2contract label to CAPK's infrastructure CRDs(KubevirtCluster, KubevirtClusterTemplate, KubevirtMachine, KubevirtMachineTemplate) via
config/crd/kustomization.yaml, so that core Cluster API v1.13+ can recognize CAPK asv1beta2-contract-compatible.
This is a metadata-only change, the same mechanism used to originally add the
v1beta1label:commonLabels: ... cluster.x-k8s.io/v1beta1: v1alpha1
• cluster.x-k8s.io/v1beta2: v1alpha1
No Go dependency bump, no controller code changes, and no change to the CRD's served/storage
API version (
v1alpha1remains the only served version). CAPK continues to watch and reconcilev1alpha1resources exactly as before.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #390Special notes for your reviewer:
This is intentionally much narrower than the earlier v1beta2 effort in #328, which bumped the
cluster-apiGo module to v1.11 and updated CAPK's own condition types — that change brokeusers still on CAPI v1.10 and was reverted in #361/#363.
This PR does not touch CAPK's dependencies or code at all; it only adds a contract label so that
core CAPI's
Cluster/topology controllers can resolveinfrastructureRef/controlPlaneReflookups when a
Clusteris created withapiVersion: cluster.x-k8s.io/v1beta2. Because theunderlying CRD API version is unchanged, this should be safe for users on any CAPI version,
including those still on v1beta1/v1.10.
Verified locally:
kustomize build config/crdshowscluster.x-k8s.io/v1beta2: v1alpha1on all 4 CRDs.controller (v0.11.2, unmodified). Created a scratch
Cluster(apiVersion: cluster.x-k8s.io/v1beta2) referencingKubevirtClustervia the newinfrastructureRef.apiGroupstyle. The core CAPI controller correctly resolved the contract, set
ownerReferences[].apiVersion: cluster.x-k8s.io/v1beta2on theKubevirtCluster, and beganreconciling normally (no "contract not found"/CRD lookup errors).
capk-controller-managerremained healthy and unaffected throughout.
Release notes: