Skip to content

chore: migrate to new CAPI contract#30

Merged
cwrau merged 1 commit into
mainfrom
chore/migrate-capi-api
Oct 20, 2025
Merged

chore: migrate to new CAPI contract#30
cwrau merged 1 commit into
mainfrom
chore/migrate-capi-api

Conversation

@cwrau

@cwrau cwrau commented Oct 20, 2025

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings October 20, 2025 14:33
@cwrau
cwrau enabled auto-merge (squash) October 20, 2025 14:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the codebase to use the new Cluster API (CAPI) contract by updating the status structure for hosted control planes. The changes align with CAPI v1beta2 requirements for control plane providers.

  • Replaced direct Initialized boolean field with nested Initialization.ControlPlaneInitialized pointer field
  • Added UpToDateReplicas status field to match CAPI contract requirements
  • Updated test assertions and kubebuilder annotations to reflect new status structure

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
api/v1alpha1/hostedcontrolplane_types.go Updated HostedControlPlaneStatus to use nested Initialization struct with pointer field instead of direct boolean; added UpToDateReplicas field
api/v1alpha1/zz_generated.deepcopy.go Auto-generated deepcopy methods for new HostedControlPlaneInitializationStatus type
pkg/reconcilers/workload/reconciler.go Updated code to set Initialization.ControlPlaneInitialized using ptr.To(true)
pkg/reconcilers/apiserverresources/apiserverresources.go Added assignment of UpToDateReplicas from deployment status
pkg/hostedcontrolplane/lifecycle_phases_test.go Updated test assertion to check nested Initialization.ControlPlaneInitialized pointer field

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cwrau
cwrau merged commit 999b723 into main Oct 20, 2025
5 checks passed
@cwrau
cwrau deleted the chore/migrate-capi-api branch October 20, 2025 14:43
cwrau added a commit that referenced this pull request Oct 20, 2025
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.

2 participants