Skip to content

[breaking][deps] Upgrade to CAPI v1.11#861

Merged
AshleyDumaine merged 14 commits intomainfrom
capi-v1.11
Sep 24, 2025
Merged

[breaking][deps] Upgrade to CAPI v1.11#861
AshleyDumaine merged 14 commits intomainfrom
capi-v1.11

Conversation

@AshleyDumaine
Copy link
Collaborator

@AshleyDumaine AshleyDumaine commented Sep 2, 2025

What this PR does / why we need it:

To keep our dependencies up-to-date, we need to bump CAPI, but that involves some breaking changes (see https://github.com/kubernetes-sigs/cluster-api/releases/tag/v1.11.0)

Notably:

  • ClusterResourceSet no longer accepts Reconcile for a strategy. ApplyOnce is the only option.
    This has been updated in the templates.

  • ControlPlaneEndpoint for the <Infraprovider>ClusterSpec now requires at least one property (e.g. port: 6443).
    The tests have been updated accordingly, no change is needed on our templates.

  • InfrastructureRef on the <Infraprovider>ClusterSpec and <Infraprovider>MachineSpec has changed to be v1beta2.ContractVersionedObjectReference instead of corev1.ObjectReference.
    The tests have been updated accordingly, no change is needed on our templates.

  • Event reasons have changed w/o proper deprecation first:

DeletedReason -> DeletionCompletedReason
DeletionFailedReason -> NotDeletingReason
  • One of the predicates we use on our resources has changed w/o proper deprecation first:
predicates.ClusterPausedTransitionsOrInfrastructureReady -> predicates.ClusterPausedTransitionsOrInfrastructureProvisioned

Special notes for the reviewer:

If trying to test the upgrade path for this: upgrading the CAPI/CAPBK providers via make local-deploy will not work if you want to test this locally with an existing cluster. clusterctl upgrade planis what to use, but this also will not work if using capi-operator to set up the management cluster which we have been doing for some time now (clusterctl init would be needed for that which this PR sets as the default for tilt).
In other words, we might be blocked on testing the upgrade path until capi-operator adds support for CAPI v1.11 and cuts a new release.

Other notes:

  • Looks like nix is out of date for clusterctl, as of writing I'm seeing it only at v1.10.4: https://mynixos.com/nixpkgs/package/clusterctl
    We need v1.11.0 or higher to use the v1beta2 CAPI CRDs if using clusterctl in devbox to set up a cluster. I don’t usually use devbox, but something to be aware of.

  • See also https://github.com/kubernetes-sigs/cluster-api/blob/v1.11.1/docs/book/src/developer/providers/migrations/v1.10-to-v1.11.md for understanding the new changes is CAPI

  • Tilt now defaults to installing the CAPI providers on the KIND cluster via clusterctl since the capi-operator is not yet updated to support CAPI v1.11.X. The capi-operator method is still supported but requires setting export USE_CAPI_OPERATOR="true" if desired.

  • Updating the templates to use the v1beta2 CAPI/Kubeadm resources will be handled in a follow-up PR.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@codecov
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

❌ Patch coverage is 63.41463% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.97%. Comparing base (089150a) to head (1307832).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/linodecluster_controller.go 33.33% 6 Missing ⚠️
cloud/services/domains.go 0.00% 1 Missing and 1 partial ⚠️
...nal/controller/linodemachine_controller_helpers.go 0.00% 2 Missing ⚠️
internal/controller/linodevpc_controller.go 80.00% 2 Missing ⚠️
internal/controller/linodemachine_controller.go 75.00% 1 Missing ⚠️
...controller/linodeobjectstoragebucket_controller.go 0.00% 1 Missing ⚠️
...al/controller/linodeobjectstoragekey_controller.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #861      +/-   ##
==========================================
- Coverage   66.20%   65.97%   -0.24%     
==========================================
  Files          71       71              
  Lines        7963     7959       -4     
==========================================
- Hits         5272     5251      -21     
- Misses       2391     2406      +15     
- Partials      300      302       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants