Skip to content

Conversation

@rajeshvenkata
Copy link
Member

Issue #, if available:
https://github.com/aws/eks-anywhere-internal/issues/3776

Description of changes:
The hardware validation for worker node rollouts was reading maxSurge from the generated MachineDeployment's Strategy.Type field. However, the template generation code only sets Strategy.Type for InPlace upgrades, leaving it empty for RollingUpdate. This caused the maxSurge check to be skipped, defaulting to 1 instead of using the user-configured value.
For example, with maxSurge=3 configured, validation would only require 1 spare hardware instead of 3, potentially causing mid-rollout failures.

The fix reads the upgrade strategy directly from the EKS-A cluster spec (workerNodeGroup.UpgradeRolloutStrategy) instead of the generated CAPI object, consistent with how KCP validation already works.

Added unit tests to verify:

  • Validation fails when hardware count doesn't meet maxSurge requirement

Testing (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot
Copy link
Collaborator

[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 ask for approval from rajeshvenkata. For more information see the Kubernetes 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

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 29, 2025
@rajeshvenkata
Copy link
Member Author

/cherry-pick release-0.24

@eks-distro-pr-bot
Copy link
Contributor

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

Details

In response to this:

/cherry-pick release-0.24

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/test-infra repository.

@rajeshvenkata
Copy link
Member Author

/cherry-pick release-0.23

@eks-distro-pr-bot
Copy link
Contributor

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

Details

In response to this:

/cherry-pick release-0.23

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/test-infra repository.

@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.58%. Comparing base (7c47a0b) to head (6ffd3e7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10453      +/-   ##
==========================================
+ Coverage   69.56%   69.58%   +0.01%     
==========================================
  Files         670      670              
  Lines       40676    40676              
==========================================
+ Hits        28297    28303       +6     
+ Misses      10670    10665       -5     
+ Partials     1709     1708       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants