Skip to content

✨ Adding Support for CAPI >= 1.11 (v1beta2) - #346

Open
schmidax wants to merge 1 commit into
mainfrom
migration/capi-v1.11
Open

schmidax wants to merge 1 commit into
mainfrom
migration/capi-v1.11

Conversation

@schmidax

Copy link
Copy Markdown

What this PR does / why we need it:
Migrate cluster-stack-operator from CAPI v1.8.1 to CAPI v1.11.0 (Stage 1).
Key changes:

  • Upgrade sigs.k8s.io/cluster-api dependency from v1.8.1 to v1.11.0
  • Update import paths: api/v1beta1 → api/core/v1beta1, exp/runtime/hooks/api/v1alpha1 → api/runtime/hooks/v1alpha1
  • Use deprecated v1beta1 conditions packages (util/deprecated/v1beta1/conditions + util/deprecated/v1beta1/patch) per Stage 1 migration guidance
  • Fix breaking API changes: external.Get (3 args), predicates.ResourceNotPausedAndHasFilterLabel (added *runtime.Scheme), removed external.GetObjectReference
  • Fix ClusterAddon webhook to implement webhook.CustomValidator (old Validator interface removed in controller-runtime)
  • Fix Helm chart templates: use dynamic namespaces ({{ .Release.Namespace }}) and release-name-based secret references
  • Fix cross-namespace ClusterClass lookup: use cluster.Spec.Topology.ClassNamespace (CAPI v1.11+ supports ClusterClasses in different namespaces than the Cluster resource)
    This is a Stage 1 migration only — conditions still use the clusterv1.Conditions type via the deprecated v1beta1 packages. Migration to metav1.Conditions (Stage 2/3) is intentionally deferred.

Special notes for your reviewer:

  • No image version changes — this PR only changes operator code, Helm chart templates, and vendored dependencies
  • Verified against kind cluster with CAPI v1.11 providers: operator reconciles ClusterStack, ClusterStackRelease, and ClusterAddon correctly

@schmidax
schmidax force-pushed the migration/capi-v1.11 branch from baa2fc0 to 331d9f2 Compare August 21, 2026 09:10
@Nils98Ar

Nils98Ar commented Sep 9, 2026

Copy link
Copy Markdown
Member

@schmidax What about the failing checks? Is there an image available somewhere, or do I need to build one myself for testing?

@schmidax

schmidax commented Sep 14, 2026 •

Copy link
Copy Markdown
Author

@Nils98Ar I'll take a look at the failing checks. And I haven't uploaded the image anywhere yet.

@schmidax
schmidax force-pushed the migration/capi-v1.11 branch from bb549c6 to e19e719 Compare September 17, 2026 07:22
@jschoone

Copy link
Copy Markdown
Contributor

Hi @schmidax and @Nils98Ar, checks are green again.
To get the image you can run the Build cso Image workflow on any branch you like. I just did that, you can use ghcr.io/sovereigncloudstack/cso-staging:sha-ef9fb41
The hash is also the commit id, which is the last commit in this PR.

@jschoone
jschoone requested review from Nils98Ar and garloff October 26, 2026 22:46

@Nils98Ar Nils98Ar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good and works for us

@jschoone

jschoone commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Hi @garloff and @schmidax,
Nils and I were successful with testing the CSO based on this PR. It supports CAPI up to 1.14 now. With that we don't have to pin it to 1.10 longer for the existing Cluster Stacks.
The support for 1.15 must be added with a separate PR, as it will likely break with the scs2 Cluster Stack. The development has already been started, I'll create a PR against main as soon as this is merged.
Do you have any objections before merging?

@schmidax

Copy link
Copy Markdown
Author

I can also confirm that in my environment the cso based on this PR works. Therefore, I have no objections.

@jschoone
jschoone force-pushed the migration/capi-v1.11 branch 2 times, most recently from e3f8a0d to fd2eaa8 Compare November 13, 2026 07:57
Migration to CAPI v1.11 (stage 1). Fix cross-namespace ClusterClass lookup (honour classNamespace in in-use checks), rename clusteraddon_webhook_new.go, plus lint and test fixes.

Signed-off-by: Axel Schmidt <axel.schmidt@rz.uni-augsburg.de>
@schmidax
schmidax force-pushed the migration/capi-v1.11 branch from 6b72485 to 0ff0c10 Compare November 16, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants