Skip to content

馃尡 feat: add support for "initialization completed" to machine pools - #14030

Open
richardcase wants to merge 3 commits into
kubernetes-sigs:mainfrom
richardcase:richardcase/MP-Initialization
Open

馃尡 feat: add support for "initialization completed" to machine pools#14030
richardcase wants to merge 3 commits into
kubernetes-sigs:mainfrom
richardcase:richardcase/MP-Initialization

Conversation

@richardcase

Copy link
Copy Markdown
Member

What this PR does / why we need it:

This adds support for the "initialization completed" status signal as per the updated infra MachinePool contract (here).

As part of this, we have added machine pools to the contract package. One difference to the contract functions is that for machine pools a provider will declare they are compatible to a contract version as a while (i.e. v1beta2). However, the contract for MachinePools was updated after v1beta2 and so the contract methods have the concept of a "fallback" field that will be used if the primary contract field isn't available. To give an example:

  • CAPA declares compatibility already with v1beta2 contract of CAPI
  • CAPA hasn't added status.initialization.provisioned to its infra MachinePools yet
  • CAPA machinepools have ready.status which was the v1beta1 contract
  • So the contract function will try status.initialization.provisioned first and the fallback to ready.status

The internal infra providers (dev & docker) have had their APIs changed to add status.initialization.provisioned.

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

/area machinepool

@kubernetes-prow kubernetes-prow Bot added the area/machinepool Issues or PRs related to machinepools label Aug 4, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from AndiDog and JoelSpeed August 4, 2026 16:10
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 4, 2026
@kubernetes-prow

Copy link
Copy Markdown
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 sbueringer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@richardcase

Copy link
Copy Markdown
Member Author

For initial review:

/assign mboersma
/assign @mpinchover

Add InfrastructureMachinePool contract helpers for the v1beta2
"initialization completed" contract change: Provisioned (contract-version
aware, falling back to status.ready for v1beta1), ProviderIDList,
Replicas and InfrastructureMachineKind, plus a StringSlice accessor
type used by ProviderIDList.
Replace the hardcoded status.ready read (external.IsReady) in
reconcileInfrastructure with the contract-version aware
InfrastructureMachinePool().Provisioned() accessor, and migrate the
providerIDList, replicas and infrastructureMachineKind reads to the
corresponding contract accessors.

Align initialization.infrastructureProvisioned with the documented API
semantics: the field is never flipped back to false once provisioning
completed (same behavior as the Machine controller).
Add status.initialization.provisioned to the v1beta2 DevMachinePool and
mark status.ready as deprecated; the controller sets both fields until
compatibility with the deprecated v1beta1 contract is dropped.
@richardcase
richardcase force-pushed the richardcase/MP-Initialization branch from bd6a150 to c1643b5 Compare August 5, 2026 16:28
@mpinchover

Copy link
Copy Markdown
Contributor

/lgtm
One stylistic note I would add is that the nested conditions could make it harder for future readability.

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 9, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 86a5ac75c179e5e5e9a3549f91eb2321ec386d1c

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 13, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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.

Comment on lines 136 to 140
// Ready denotes that the machine pool is ready
//
// Deprecated: This field is deprecated and is going to be removed in a future apiVersion. Use initialization.provisioned instead.
// +optional
Ready bool `json:"ready"`

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.

I think we should drop this field in v1beta2 directly. IIRC we just kept it because we couldn't migrate to the v1beta2 contract yet

@sbueringer

Copy link
Copy Markdown
Member

I think this PR should be orthogonal but I'll wait with review until #13803 is merged just to be safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/machinepool Issues or PRs related to machinepools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants