Skip to content

Update RKE2 ClusterClass to v1beta2 and bump provider to v0.24.3#6279

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
mboersma:fix-rke2-clusterclass
May 6, 2026
Merged

Update RKE2 ClusterClass to v1beta2 and bump provider to v0.24.3#6279
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
mboersma:fix-rke2-clusterclass

Conversation

@mboersma
Copy link
Copy Markdown
Contributor

@mboersma mboersma commented May 5, 2026

What type of PR is this?

/kind failing-test

What this PR does / why we need it:

The RKE2 clusterclass e2e test is currently pinned to RKE2 provider v0.21.1 because newer versions changed the schema for RKE2ControlPlaneTemplate and RKE2ConfigTemplate. Specifically, rancher/cluster-api-provider-rke2#793 and #794 (released in v0.22.0) introduced a v1beta2 API and the v1beta2 contract: RKE2ControlPlane.spec.machineTemplate is no longer the InfrastructureRef container itself, but now wraps a Spec field that holds infrastructureRef (of type ContractVersionedObjectReference). CAPI v1.13's topology controller writes against this new contract and produced the schema error reported in #6081.

This PR updates our RKE2 clusterclass templates to use the v1beta2 API for RKE2 types and bumps the pinned provider version to v0.24.3 (latest stable):

  • RKE2ControlPlaneTemplate and RKE2ConfigTemplate apiVersions changed from v1beta1 to v1beta2 in both base flavor (templates/flavors/clusterclass-rke2/) and the CI overlay (templates/test/ci/prow-clusterclass-ci-rke2/).
  • ClusterClass controlPlane.ref and worker bootstrap.ref updated to v1beta2 for the RKE2 types. The ClusterClass itself stays on cluster.x-k8s.io/v1beta1, matching the rest of CAPZ.
  • All ClusterClass patch selectors targeting RKE2 types updated to v1beta2.
  • Webhook-readiness dry-run snippet in azure_test.go updated to v1beta2.
  • RKE2 provider pin bumped from v0.21.1 to v0.24.3.
  • Rendered cluster templates regenerated via make generate-flavors.

The patches that reference built-in topology variables ({{ .builtin.controlPlane.machineTemplate.infrastructureRef.name }}, {{ .builtin.machineDeployment.infrastructureRef.name }}) are unchanged — those built-in names persist across the contract version.

Which issue(s) this PR fixes:
Fixes #6081

Special notes for your reviewer:

The actual validation of this fix is pull-cluster-api-provider-azure-e2e-optional. Local checks (go vet -tags=e2e, make lint, make generate) all pass cleanly.

This effectively reverts the temporary pin in #6085 while raising the pin to a maintained release.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label May 5, 2026
@k8s-ci-robot k8s-ci-robot added the kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. label May 5, 2026
@k8s-ci-robot k8s-ci-robot requested review from bryan-cox and nojnhuh May 5, 2026 21:59
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 5, 2026
@mboersma
Copy link
Copy Markdown
Contributor Author

mboersma commented May 5, 2026

/test pull-cluster-api-provider-azure-e2e-optional

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.88%. Comparing base (bd1e799) to head (29c5828).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6279   +/-   ##
=======================================
  Coverage   43.88%   43.88%           
=======================================
  Files         289      289           
  Lines       25351    25351           
=======================================
  Hits        11125    11125           
  Misses      13448    13448           
  Partials      778      778           

☔ 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.

@mboersma
Copy link
Copy Markdown
Contributor Author

mboersma commented May 6, 2026

/retest

@mboersma mboersma requested review from jackfrancis and willie-yao May 6, 2026 14:19
Copy link
Copy Markdown
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 6, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: f3c55d404c8f159a0b5ef95bdc8b8b0e2ffdbbc1

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: willie-yao

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

The pull request process is described here

Details 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 6, 2026
@k8s-ci-robot k8s-ci-robot merged commit e4d4af9 into kubernetes-sigs:main May 6, 2026
29 of 30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in CAPZ Planning May 6, 2026
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone May 6, 2026
@mboersma mboersma deleted the fix-rke2-clusterclass branch May 6, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

RKE2 test failing on invalid RKE2ControlPlane schema

3 participants