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

Default min/max sizes for Azure VMSSs #6864

Closed
rrangith opened this issue May 22, 2024 · 0 comments · Fixed by #6863
Closed

Default min/max sizes for Azure VMSSs #6864

rrangith opened this issue May 22, 2024 · 0 comments · Fixed by #6863
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@rrangith
Copy link
Contributor

rrangith commented May 22, 2024

Which component are you using?:

cluster-autoscaler

Is your feature request designed to solve a problem? If so describe the problem this feature should solve.:
Currently if a VMSS is missing a min or max tag it will be ignored by CA.

if spec.MinSize < 0 {
klog.Warningf("ignoring vmss %q because of minimum size must be a non-negative number of nodes", *scaleSet.Name)
continue
}
if val, ok := scaleSet.Tags["max"]; ok {
if maxSize, err := strconv.Atoi(*val); err == nil {
spec.MaxSize = maxSize
} else {
klog.Warningf("ignoring vmss %q because of invalid maximum size specified for vmss: %s", *scaleSet.Name, err)
continue
}
} else {
klog.Warningf("ignoring vmss %q because of no maximum size specified for vmss", *scaleSet.Name)
continue
}
if spec.MaxSize < spec.MinSize {
klog.Warningf("ignoring vmss %q because of maximum size must be greater than minimum size: max=%d < min=%d", *scaleSet.Name, spec.MaxSize, spec.MinSize)
continue

Azure has a limit of 50 tags per resource https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources#limitations. So these 2 tags take up valuable tag slots.

If a user is fine with the VMSS using a default value for min/max, they could omit the min/max tags and instead use the default

Describe the solution you'd like.:

Maybe a way to configure a min/max through autodiscovery, similar to how GCP does it

"GCE matches by IG name prefix, and requires you to specify min and max nodes per IG, e.g. `mig:namePrefix=pfx,min=0,max=10` "+

Describe any alternative solutions you've considered.:

An alternative solution is just to default the min to 0 #6858

This would save 1 tag

Additional context.:

@rrangith rrangith added the kind/feature Categorizes issue or PR as related to a new feature. label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant