Skip to content

Conversation

@liuxu623
Copy link
Contributor

@liuxu623 liuxu623 commented Dec 9, 2025

What this PR does / why we need it:

Prior to Cluster API v1.7, infraMachine and bootstrapConfig objects created by MachineSet and KubeadmControlPlane could have names that differed from their associated Machine names. Starting from v1.7 (#9833), these objects consistently use the Machines name.

When performing in-place updates on Machines created before v1.7, we must preserve the existing infraMachine and bootstrapConfig names to avoid breaking associations with existing infrastructure resources.

This commit ensures backward compatibility by preserving existing bootstrapConfig names in computeDesiredBootstrapConfig and existing infraMachine names in computeDesiredInfraMachine.

Part of #12291

/area machineset
/area provider/control-plane-kubeadm

…lity with pre-v1.7 in-place updates

Prior to Cluster API v1.7, infraMachine and bootstrapConfig objects created by MachineSet and KubeadmControlPlane could have names that differed from their associated Machine names. Starting from v1.7 (kubernetes-sigs#9833), these objects consistently use the Machines name.

When performing in-place updates on Machines created before v1.7, we must preserve the existing infraMachine and bootstrapConfig names to avoid breaking associations with existing infrastructure resources.

This commit ensures backward compatibility by preserving existing bootstrapConfig names in computeDesiredBootstrapConfig and existing infraMachine names in computeDesiredInfraMachine.
@k8s-ci-robot k8s-ci-robot added area/machineset Issues or PRs related to machinesets area/provider/control-plane-kubeadm Issues or PRs related to KCP labels Dec 9, 2025
@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 9, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @liuxu623. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 9, 2025
@liuxu623
Copy link
Contributor Author

liuxu623 commented Dec 9, 2025

/assign fabriziopandini

@fabriziopandini
Copy link
Member

@liuxu623 thanks for this PR
I will try to get it merged for the .1 patch release in ~1 week (it is too late for today's release)

@fabriziopandini
Copy link
Member

/retest

Copy link
Member

@fabriziopandini fabriziopandini 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 Dec 11, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c926d67aab3c1a6c21e7bf70356a59cd2b5590d3

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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

The pull request process is described here

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 Dec 11, 2025
@fabriziopandini
Copy link
Member

/cherry-pick release-1.12

@k8s-infra-cherrypick-robot

@fabriziopandini: once the present PR merges, I will cherry-pick it on top of release-1.12 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.12

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.

@fabriziopandini
Copy link
Member

/retest

@fabriziopandini
Copy link
Member

/test pull-cluster-api-test-main

@fabriziopandini
Copy link
Member

/retest

@fabriziopandini
Copy link
Member

/test pull-cluster-api-e2e-blocking-main

@fabriziopandini
Copy link
Member

/retest

@fabriziopandini
Copy link
Member

/test pull-cluster-api-e2e-blocking-main

1 similar comment
@liuxu623
Copy link
Contributor Author

/test pull-cluster-api-e2e-blocking-main

@k8s-ci-robot
Copy link
Contributor

@liuxu623: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-cluster-api-e2e-blocking-main

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.

@fabriziopandini
Copy link
Member

/test pull-cluster-api-e2e-blocking-main

@k8s-ci-robot k8s-ci-robot merged commit 77ddb25 into kubernetes-sigs:main Dec 12, 2025
22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Dec 12, 2025
@k8s-infra-cherrypick-robot

@fabriziopandini: new pull request created: #13147

In response to this:

/cherry-pick release-1.12

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.

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. area/machineset Issues or PRs related to machinesets area/provider/control-plane-kubeadm Issues or PRs related to KCP 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-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants