-
Notifications
You must be signed in to change notification settings - Fork 638
✨ feat: Implement autoscaling from zero by auto-populating AWSMachineTemplate capacity/nodeInfo #5711
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
✨ feat: Implement autoscaling from zero by auto-populating AWSMachineTemplate capacity/nodeInfo #5711
Conversation
|
Hi @LiangquanLi930. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
|
/ok-to-test |
f1ee365 to
3be8f4d
Compare
01be987 to
915f55b
Compare
915f55b to
b3850d1
Compare
035c7f7 to
03683f1
Compare
|
/assign @nrb |
…deInfo Add AWSMachineTemplateReconciler to automatically populate capacity and node info fields by querying AWS EC2 API. This completes the autoscaling from zero implementation by ensuring the required metadata is available without manual configuration. Changes include: - Add NodeInfo struct with Architecture and OperatingSystem fields to AWSMachineTemplate status - Implement controller that queries EC2 API for instance type specifications - Auto-populate CPU, memory, pods, and ephemeral storage capacity - Auto-detect architecture (amd64/arm64) and OS (linux/windows) from AMI - Add conversion logic for backward compatibility with v1beta1 - Enable status subresource on AWSMachineTemplate CRD - Add comprehensive unit tests (351 lines) covering various scenarios - Add RBAC permissions for controller operations The controller automatically populates these fields when an AWSMachineTemplate is created or updated, eliminating the need for manual configuration and enabling Cluster Autoscaler to make informed scaling decisions from zero nodes. Related: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md Squashed from 5 commits: - 9a92a43 Implement autoscaling from zero by auto-populating AWSMachineTemplate capacity - 86fe072 add AWSMachineTemplate NodeInfo - ddaf62c Fix review comments - 4ea52c8 Fix review comments 2 - b398ffc Fix review comments 3
03683f1 to
ffdf7db
Compare
|
rebase #5720 |
|
/retest |
8ec1d0b to
955bdda
Compare
|
@LiangquanLi930: The following test failed, say
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. |
|
Hey @LiangquanLi930 can you squash the rebase commit and stack your ones on top? Thanks |
@damdo Hi, I’m keeping the commits separate for now to make rebasing and reviewing easier. Once you think everything looks good, I’ll squash the commits. |
955bdda to
6493363
Compare
Add Conditions to AWSMachineTemplateStatus and update controller for CAPI v1.11 API changes. Squashed from 2 commits: - ffdf7db Fix review comments 4 - 6493363 rebase kubernetes-sigs#5720
6493363 to
9867d5a
Compare
|
/lgtm |
|
LGTM label has been added. Git tree hash: 2d4c64dd7e397c439296d69123b29b2e14aff263
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nrb 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 |
|
I know it approved but also had a look myself and i would 've also /approve |
✨ Implement autoscaling from zero by auto-populating AWSMachineTemplate capacity and NodeInfo
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements the Cluster API autoscaling from zero proposal for CAPA by adding a controller that automatically populates
AWSMachineTemplate.Status.Capacitywith instance type information.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Checklist:
Release note: