Skip to content
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

Add vms pool implementation in 1.27 #7292

Open
wants to merge 5 commits into
base: cluster-autoscaler-release-1.27
Choose a base branch
from

Conversation

wenxuan0923
Copy link
Contributor

@wenxuan0923 wenxuan0923 commented Sep 17, 2024

What type of PR is this?

/kind feature

Optionally add one or more of the following kinds if applicable:

-->

What this PR does / why we need it:

Add implementation to support VMs pool autoscaling. It does not support GPU pool for now (will be handled later).
It is same with #6951, but for version 1.27

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  1. Add a new toggle EnableVMsAgentPool to guard the behavior for VMs pool - it is default to false (azure_config.go)
  2. Send List AP request to AKS-RP for constructing cache for vms pool - this will make sure it works for VMs pool with 0 node. (azure_cache.go)
  3. Add a generic NodeTemplate which supports both VMSS and VMs agentpool, it will be used for scaling up VMs pool with 0 node. Before this change, only VMSS instance can be used as node template. (azure_template.go)
  4. Add implementation for VMs pool, it supports scaling up by sending PUT AP request to AKS, and scaling down through DELETE machines request. It will use Deallocate mode from the agentpool to decide whether to delete or deallocate vm. (azure_vms_pool.go)

Does this PR introduce a user-facing change?

NONE (change is guarded by a toggle enableVMsAgentPool which is default to false. No cx-facing change right now.)


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 17, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @wenxuan0923. Thanks for your PR.

I'm waiting for a kubernetes 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 area/provider/azure Issues or PRs related to azure provider label Sep 17, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wenxuan0923
Once this PR has been reviewed and has the lgtm label, please assign x13n for approval. For more information see the Kubernetes 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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 17, 2024
Copy link
Contributor

@comtalyst comtalyst left a comment

Choose a reason for hiding this comment

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

Overall looking good, left some comments

@@ -89,6 +89,9 @@ type Config struct {
// EnableForceDelete defines whether to enable force deletion on the APIs
EnableForceDelete bool `json:"enableForceDelete,omitempty" yaml:"enableForceDelete,omitempty"`

// EnableVMsAgentPool defines whether to support VMs agentpool type in addition to VMSS type
Copy link
Contributor

Choose a reason for hiding this comment

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

I would recommend adding some notes here regarding the current nature of this feature (e.g., for testing only, not production ready)

Taints []string
// for vmss pool only
InputLabels map[string]string
InputTaints string
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the difference between this and Taints just the data type and usage?
Wondering if there is a way to make that more intuitive, maybe adding a comment?

@comtalyst
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 4, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/azure Issues or PRs related to azure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants