Skip to content

🌱 Update to Kubernetes v1.33.2 and cluster-api v1.11 #2611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pierreprinetti
Copy link
Contributor

@pierreprinetti pierreprinetti commented Jun 26, 2025

What this PR does / why we need it:

Is it time for a kube bump yet?

Notes for the reviewers:

  • Use Go v1.24.4
  • Replace import path "sigs.k8s.io/cluster-api/api/v1beta1" with "sigs.k8s.io/cluster-api/api/core/v1beta1"
  • Replace import path "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1" with "sigs.k8s.io/cluster-api/api/ipam/v1beta1"
  • Replace import path "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" with "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1"
  • Replace import path "sigs.k8s.io/cluster-api/hack/tools/release" with "sigs.k8s.io/cluster-api/hack/tools/release/notes"
  • Replace import path "sigs.k8s.io/cluster-api/utils/patch" with "sigs.k8s.io/cluster-api/utils/deprecated/v1beta1/patch"
  • Use util packages from cluster-api/util/deprecated/v1beta1 where
    necessary
  • make generate
  • Update API rule violations

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

Copy link

netlify bot commented Jun 26, 2025

Deploy Preview for kubernetes-sigs-cluster-api-openstack failed. Why did it fail? →

Name Link
🔨 Latest commit 7130f9e
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-openstack/deploys/68669a1bc8c2f20008e22f72

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 26, 2025
@k8s-ci-robot k8s-ci-robot requested review from EmilienM and mdbooth June 26, 2025 08:30
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign neolit123 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 26, 2025
@pierreprinetti pierreprinetti force-pushed the kube_bump branch 2 times, most recently from ac118fe to 27b703f Compare June 26, 2025 12:01
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 26, 2025
@pierreprinetti pierreprinetti force-pushed the kube_bump branch 4 times, most recently from 430982a to 5890737 Compare June 26, 2025 12:16
@pierreprinetti pierreprinetti changed the title 🌱 Update to Kubernetes v1.33.2 🌱 Update to Kubernetes v1.33.2 and cluster-api v1.10.3 Jun 26, 2025
@pierreprinetti
Copy link
Contributor Author

/hold

cluster-api v1.10.3 still needs apimachinery v0.32.3. The bump has been made on the main branch, and we have to wait for them to cut a release.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2025
@pierreprinetti
Copy link
Contributor Author

pierreprinetti commented Jun 27, 2025

Util functions in cluster-api v1.11 return v1beta2 objects. Do we expect to use v1beta2 objects in the CAPO releases that are meant for k8s v1.33?

CC @mdbooth @lentzi90

@mdbooth
Copy link
Contributor

mdbooth commented Jun 27, 2025

Util functions in cluster-api v1.11 return v1beta2 objects. Do we expect to use v1beta2 objects in the CAPO releases that are meant for k8s v1.33?

Sounds like this is going to be the path of least resistance. Do you think it's worth a separate PR to bump to v1beta2 objects?

@pierreprinetti
Copy link
Contributor Author

Util functions in cluster-api v1.11 return v1beta2 objects. Do we expect to use v1beta2 objects in the CAPO releases that are meant for k8s v1.33?

Sounds like this is going to be the path of least resistance. Do you think it's worth a separate PR to bump to v1beta2 objects?

It looks like v1beta2 was introduced in capi v1.11: https://github.com/kubernetes-sigs/cluster-api/tree/v1.10.3/api

@pierreprinetti pierreprinetti changed the title 🌱 Update to Kubernetes v1.33.2 and cluster-api v1.10.3 🌱 Update to Kubernetes v1.33.2 and cluster-api v1.11 Jun 27, 2025
@pierreprinetti
Copy link
Contributor Author

pierreprinetti commented Jul 3, 2025

[EDIT] this was a long question that is not necessary any more

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 3, 2025
@pierreprinetti
Copy link
Contributor Author

@mdbooth In the end I think that the best solution would be for cluster-api to continue to provide the v1beta1 util functions we need. I am proposing it here: kubernetes-sigs/cluster-api#12441

This PR temporarily uses my fork of cluster-api to test the potential result.

* Use Go v1.24.4
* Replace import path "sigs.k8s.io/cluster-api/api/v1beta1" with "sigs.k8s.io/cluster-api/api/core/v1beta1"
* Replace import path "sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1" with "sigs.k8s.io/cluster-api/api/ipam/v1beta1"
* Replace import path "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" with "sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta1"
* Replace import path "sigs.k8s.io/cluster-api/hack/tools/release" with "sigs.k8s.io/cluster-api/hack/tools/release/notes"
* Replace import path "sigs.k8s.io/cluster-api/utils/patch" with "sigs.k8s.io/cluster-api/utils/deprecated/v1beta1/patch"
* Use util packages from cluster-api/util/deprecated/v1beta1 where
  necessary
* make generate
* Update API rule violations
@k8s-ci-robot
Copy link
Contributor

@pierreprinetti: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-openstack-build 7130f9e link true /test pull-cluster-api-provider-openstack-build
pull-cluster-api-provider-openstack-test 7130f9e link true /test pull-cluster-api-provider-openstack-test
pull-cluster-api-provider-openstack-e2e-test 7130f9e link true /test pull-cluster-api-provider-openstack-e2e-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@pierreprinetti
Copy link
Contributor Author

test/e2e/shared/suite.go:188:56: cannot use OpenStackLogCollector{…} (value of struct type OpenStackLogCollector) as framework.ClusterLogCollector value in argument to framework.WithMachineLogCollector: OpenStackLogCollector does not implement framework.ClusterLogCollector (wrong type for method CollectInfrastructureLogs)
		have CollectInfrastructureLogs(context.Context, "sigs.k8s.io/controller-runtime/pkg/client".Client, *"sigs.k8s.io/cluster-api/api/core/v1beta1".Cluster, string) error
		want CollectInfrastructureLogs(context.Context, "sigs.k8s.io/controller-runtime/pkg/client".Client, *"sigs.k8s.io/cluster-api/api/core/v1beta2".Cluster, string) error 

I’m starting to question what I committed to.

@mdbooth
Copy link
Contributor

mdbooth commented Jul 3, 2025

The problem is we're trying to call framework.WithMachineLogCollector from CAPI , which takes an argument which implements the ClusterLogCollector from CAPI. There's only a v1beta2 version of this interface, and of framework.WithMachineLogCollector. I have a horrible suspicion that at the end of this road is a complete re-implementation of the CAPI test framework 😬

@pierreprinetti
Copy link
Contributor Author

@mdbooth
What do you think about @fabriziopandini's comment in the cluster-api PR?

Shall we move to v1beta2 manifests (based on cluster-api v1beta2), move controllers to v1beta2 and implement conversion to support v1beta1?

@mdbooth
Copy link
Contributor

mdbooth commented Jul 7, 2025

@mdbooth What do you think about @fabriziopandini's comment in the cluster-api PR?

Shall we move to v1beta2 manifests (based on cluster-api v1beta2), move controllers to v1beta2 and implement conversion to support v1beta1?

I personally think this is the path of least resistance. If I'm honest it's what I originally assumed you were doing here.

I don't think we'll need any conversions until we update the OpenStack resources (OpenStackMachine, OpenStackCluster) to the v1beta2 contract. That is: CAPO controllers will consume CAPI v1beta2 objects, but will themselves continue to publish infra objects conforming to CAPI v1beta1. We've been set a deadline of August next year to move to v1beta2, though, so we should probably get on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
Status: Inbox
Development

Successfully merging this pull request may close these issues.

3 participants