Skip to content

✨ Check control plane version skew before creating new launch template version #5560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fiunchinho
Copy link
Contributor

@fiunchinho fiunchinho commented Jun 19, 2025

/kind feature

What this PR does / why we need it:

This is a draft PR to gather feedback about a potential approach to solve the k8s version skew problem, where AWSMachinePool workers are upgraded to newer k8s versions before the control plane nodes are upgraded.

Release note:

Check control plane version skew before creating new launch template version

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Jun 19, 2025
@k8s-ci-robot
Copy link
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 neolit123 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 19, 2025
@k8s-ci-robot k8s-ci-robot requested review from cnmcavoy and nrb June 19, 2025 12:53
@fiunchinho fiunchinho changed the title Check control plane version skew before creating new launch template … Check control plane version skew before creating new launch template version Jun 19, 2025
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 19, 2025
@fiunchinho fiunchinho changed the title Check control plane version skew before creating new launch template version ✨ Check control plane version skew before creating new launch template version Jun 19, 2025
@fiunchinho fiunchinho force-pushed the control-plane-skew branch from d872e60 to ebb7acc Compare June 19, 2025 13:04
@fiunchinho fiunchinho changed the title ✨ Check control plane version skew before creating new launch template version WIP: ✨ Check control plane version skew before creating new launch template version Jun 19, 2025
@fiunchinho fiunchinho force-pushed the control-plane-skew branch 2 times, most recently from 09f90d8 to 8a507ce Compare June 19, 2025 23:19
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 19, 2025
@fiunchinho fiunchinho changed the title WIP: ✨ Check control plane version skew before creating new launch template version ✨ Check control plane version skew before creating new launch template version Jun 19, 2025
@fiunchinho
Copy link
Contributor Author

/test all

@fiunchinho fiunchinho force-pushed the control-plane-skew branch from 8a507ce to 5e4e6e8 Compare June 20, 2025 12:32
@fiunchinho
Copy link
Contributor Author

/retest

@fiunchinho fiunchinho marked this pull request as ready for review June 23, 2025 07:48
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2025
@k8s-ci-robot k8s-ci-robot requested a review from dlipovetsky June 23, 2025 07:48
@k8s-ci-robot
Copy link
Contributor

@fiunchinho: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-test 5e4e6e8 link true /test pull-cluster-api-provider-aws-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Copy link
Member

@richardcase richardcase left a comment

Choose a reason for hiding this comment

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

I think this is a good approach to stop upgrading the MachinePools too early.

// isMachinePoolAllowedToUpgradeDueToControlPlaneVersionSkew checks if the control plane is being upgraded, in which case we shouldn't update the launch template.
func (r *AWSMachinePoolReconciler) isMachinePoolAllowedToUpgradeDueToControlPlaneVersionSkew(clusterScope cloud.ClusterScoper, machinePoolScope *scope.MachinePoolScope) (bool, error) {
if machinePoolScope.Cluster.Spec.ControlPlaneRef == nil {
return true, nil
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we'd want to proceed in this case with the upgrade.

@richardcase
Copy link
Member

/milestone v2.9

@k8s-ci-robot k8s-ci-robot added this to the v2.9 milestone Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants