Skip to content

Conversation

PavanNeerudu
Copy link
Contributor

@PavanNeerudu PavanNeerudu commented Aug 26, 2025

✨ Upgrade cluster-api to v1.11.0

What this PR does / why we need it:

This PR upgrades the cluster-api dependencies from v1.10.4 to v1.11.0, which includes several breaking changes that required significant code updates:

  • Dependency Updates: Upgraded sigs.k8s.io/cluster-api to v1.11.0 and related dependencies
  • API Version Updates: Updated import paths from v1beta1 to v1beta2 where applicable
  • Validation Fixes: Fixed condition reason validation by ensuring all condition reasons follow Kubernetes naming conventions (no spaces, alphanumeric with underscores)
  • Test Updates: Updated all test files to use the new condition helper patterns and fixed compatibility issues
  • CRD Updates: Regenerated CRDs to match the new cluster-api v1.11.0 specifications

This upgrade ensures compatibility with the latest cluster-api release and maintains all existing functionality while adopting the standardized Kubernetes condition handling patterns.

Testing:

  • All unit tests pass with the new cluster-api version
  • Condition validation errors have been resolved
  • Contract version compatibility verified

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Fixes: #854

- Upgraded cluster-api dependencies from v1.10.4 to v1.11.0
- Migrated from cluster-api conditions helpers to k8s.io/apimachinery/pkg/api/meta
- Updated condition handling to use meta.SetStatusCondition and meta.IsStatusConditionTrue
- Fixed condition reason validation by removing spaces from error messages
- Updated import paths from v1beta1 to v1beta2 where applicable
- Updated test files to use new condition helper patterns
- Resolved CRD validation issues and contract version compatibility
- All unit tests now pass with the new cluster-api version
Copy link

netlify bot commented Aug 26, 2025

Deploy Preview for kubernetes-sigs-cluster-api-operator ready!

Name Link
🔨 Latest commit 05b3d76
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-operator/deploys/68b5cc125035960008a7fe50
😎 Deploy Preview https://deploy-preview-880--kubernetes-sigs-cluster-api-operator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 26, 2025
@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 danil-grigorev 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 26, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @PavanNeerudu. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 26, 2025
@furkatgofurov7
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 26, 2025
- Remove unused clusterctlv1, configclient, and client imports
- These imports became unused after updating deleteClusterAPICRDs function
- Fixes compilation errors in E2E tests
- Exclude operator.cluster.x-k8s.io group from CRD cleanup
- Prevents deletion of cluster-api-operator's own CRDs during E2E tests
- Fixes 'no matches for kind CoreProvider' error in E2E tests
- CRD cleanup now only removes cluster-api provider CRDs, not operator CRDs
@PavanNeerudu
Copy link
Contributor Author

/retest pull-cluster-api-operator-e2e-main

@k8s-ci-robot
Copy link
Contributor

@PavanNeerudu: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

/test pull-cluster-api-operator-build-main
/test pull-cluster-api-operator-e2e-main
/test pull-cluster-api-operator-make-main
/test pull-cluster-api-operator-test-main
/test pull-cluster-api-operator-verify-main

The following commands are available to trigger optional jobs:

/test pull-cluster-api-operator-apidiff-main

Use /test all to run all jobs.

In response to this:

/retest pull-cluster-api-operator-e2e-main

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.

@PavanNeerudu
Copy link
Contributor Author

/test pull-cluster-api-operator-e2e-main

- Add CoreProvider upgrade step before BootstrapProvider and ControlPlaneProvider upgrades
- Required for contract version compatibility (v1beta1 -> v1beta2)
- Fixes clusterctl error: 'could only upgrade to v1beta2 contract version, requested v1beta1'
- Ensures all providers use consistent contract versions during upgrades
- Change patch := to patch = for second usage in same scope
- Fixes compilation errors: 'no new variables on left side of :='
- Both BootstrapProvider and ControlPlaneProvider tests now compile correctly
- Add ipam.cluster.x-k8s.io to excluded groups in deleteClusterAPICRDs
- IPAM provider CRDs are needed by cluster-api-operator itself
- Prevents IPAM controller failures due to missing CRDs
- Fixes 'no matches for kind InClusterIPPool/GlobalInClusterIPPool' errors
- Now excludes both operator.cluster.x-k8s.io and ipam.cluster.x-k8s.io groups
@PavanNeerudu
Copy link
Contributor Author

Hi @furkatgofurov7 , could you review the PR. I was able to resolve the failures in the last iterations. There is however a pipeline failure(pull-cluster-api-operator-apidiff-main) which is expected because this PR brings in changes from cluster-api conditions to the kubernetes conditions. Since the project is on alpha, do you think we can bypass this failure or suggest what we can do here? Thanks!

@PavanNeerudu
Copy link
Contributor Author

Hey @furkatgofurov7 , checking in for reviews on the PR.

@furkatgofurov7
Copy link
Member

@PavanNeerudu thanks for the PR, I'll take a closer look soon, but meanwhile can you please take care of adding kind: Metadata to all metadata manifests? That seems to be a new requirement from CAPI v1.11.0 which providers need to update, xref: kubernetes-sigs/cluster-api#12242.

@furkatgofurov7
Copy link
Member

furkatgofurov7 commented Aug 29, 2025

Hi @furkatgofurov7 , could you review the PR. I was able to resolve the failures in the last iterations. There is however a pipeline failure(pull-cluster-api-operator-apidiff-main) which is expected because this PR brings in changes from cluster-api conditions to the kubernetes conditions. Since the project is on alpha, do you think we can bypass this failure or suggest what we can do here? Thanks!

Yes, api-diff failure is quite normal to ignore, hence it is not a required job if you have noticed.

@PavanNeerudu
Copy link
Contributor Author

@PavanNeerudu thanks for the PR, I'll take a closer look soon, but meanwhile can you please take care of adding kind: Metadata to all metadata manifests? That seems to be a new requirement from CAPI v1.11.0 which providers need to update, xref: kubernetes-sigs/cluster-api#12242.

Done. Updated in the latest commits.

@k8s-ci-robot
Copy link
Contributor

@PavanNeerudu: The following test 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-operator-apidiff-main 05b3d76 link false /test pull-cluster-api-operator-apidiff-main

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.

@@ -569,7 +569,7 @@ func (p *PhaseReconciler) validateRepoCAPIVersion(ctx context.Context) error {
return fmt.Errorf("invalid provider metadata: version %s for the provider %s does not match any release series", p.options.Version, name)
}

if releaseSeries.Contract != "v1alpha4" && releaseSeries.Contract != "v1beta1" {
if releaseSeries.Contract != "v1alpha4" && releaseSeries.Contract != "v1beta1" && releaseSeries.Contract != "v1beta2" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v1alpha4 has been deprecated and not served. Should we delete it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. I let @furkatgofurov7 answer this

Copy link
Member

@furkatgofurov7 furkatgofurov7 Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PavanNeerudu, it can be deleted in fact 👍🏼

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAPI v1.11.0-beta.0 has been released and is ready for testing
4 participants