Skip to content

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

Open
schmidax wants to merge 4 commits into
mainfrom
migration/capi-v1.11
Open

✨ Adding Support for CAPI >= 1.11 (v1beta2)#346
schmidax wants to merge 4 commits 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

- Upgrade CAPI dependency from v1.8.1 to v1.11.0
- Update import paths to v1beta1/v1beta2 locations
- Use deprecated v1beta1 conditions packages (Stage 1)
- Fix API signature changes (external.Get, predicates)
- Fix ClusterAddon webhook (CustomValidator interface)
- Fix Helm chart templates (dynamic namespaces)
- Add MIGRATION.md documentation

Per CAPI v1.11 migration guide:
https://release-1-11.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.10-to-v1.11

Signed-off-by: Axel Schmidt <axel.schmidt@rz.uni-augsburg.de>
- Upgrade CAPI dependency from v1.8.1 to v1.11.0
- Update import paths to v1beta1/v1beta2 locations
- Use deprecated v1beta1 conditions packages (Stage 1)
- Fix API signature changes (external.Get, predicates)
- Fix ClusterAddon webhook (CustomValidator interface)
- Fix Helm chart templates (dynamic namespaces)

Per CAPI v1.11 migration guide:
https://release-1-11.cluster-api.sigs.k8s.io/developer/providers/migrations/v1.10-to-v1.11

Signed-off-by: Axel Schmidt <axel.schmidt@rz.uni-augsburg.de>
- Use cluster.Spec.Topology.ClassNamespace when looking up ClusterStackRelease
- Fallback to cluster.Namespace if classNamespace is not set
- Supports CAPI v1.11+ cross-namespace ClusterClass references

Signed-off-by: Axel Schmidt <axel.schmidt@rz.uni-augsburg.de>
Signed-off-by: Axel Schmidt <axel.schmidt@rz.uni-augsburg.de>
@schmidax
schmidax force-pushed the migration/capi-v1.11 branch from baa2fc0 to 331d9f2 Compare August 21, 2026 09:10
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.

1 participant