-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[AKS HOBO] Add support for hosted-on-behalf-of systempool autoscaling #8596
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,9 +154,16 @@ func (vmPool *VMPool) IncreaseSize(delta int) error { | |
if len(versionedAP.Properties.VirtualMachinesProfile.Scale.Manual) > 0 { | ||
requestBody = buildRequestBodyForScaleUp(versionedAP, count, vmPool.sku) | ||
|
||
} else { // AKS-managed CAS will use custom header for setting the target count | ||
} | ||
// hosted CAS will be using Autoscale scale profile | ||
// HostedSystem will be using manual scale profile | ||
// Both of them need to set the Target-Count and SKU headers | ||
if len(versionedAP.Properties.VirtualMachinesProfile.Scale.Autoscale) > 0 || | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the new states that make us stop using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is because Hobo systempool will only have manual scale profile, but its scaling request will be processed by NPS, so a simple if-else check on the scale profile type is no longer sufficient to distinguish between self-hosted and managed CAS. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is my understanding below correct? Before:
Now:
|
||
(versionedAP.Properties.Mode != nil && | ||
strings.EqualFold(string(*versionedAP.Properties.Mode), "HostedSystem")) { | ||
header := make(http.Header) | ||
header.Set("Target-Count", fmt.Sprintf("%d", count)) | ||
header.Set("SKU", fmt.Sprintf("%s", vmPool.sku)) | ||
updateCtx = policy.WithHTTPHeader(updateCtx, header) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to in azure_config.go, do you mind adding a comment on the purpose of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments added