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

update azure instances and template with np-series SKU #4648

Merged
merged 2 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions cluster-autoscaler/cloudprovider/azure/azure_instance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 65536,
GPU: 0,
},
"Standard_D16darm_V3": {
InstanceType: "Standard_D16darm_V3",
VCPU: 16,
MemoryMb: 65536,
GPU: 0,
},
"Standard_D16ds_v4": {
InstanceType: "Standard_D16ds_v4",
VCPU: 16,
Expand Down Expand Up @@ -502,6 +508,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 8192,
GPU: 0,
},
"Standard_D2darm_V3": {
InstanceType: "Standard_D2darm_V3",
VCPU: 2,
MemoryMb: 8192,
GPU: 0,
},
"Standard_D2ds_v4": {
InstanceType: "Standard_D2ds_v4",
VCPU: 2,
Expand Down Expand Up @@ -604,6 +616,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 131072,
GPU: 0,
},
"Standard_D32darm_V3": {
InstanceType: "Standard_D32darm_V3",
VCPU: 32,
MemoryMb: 131072,
GPU: 0,
},
"Standard_D32ds_v4": {
InstanceType: "Standard_D32ds_v4",
VCPU: 32,
Expand Down Expand Up @@ -718,6 +736,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 196608,
GPU: 0,
},
"Standard_D48darm_V3": {
InstanceType: "Standard_D48darm_V3",
VCPU: 48,
MemoryMb: 196608,
GPU: 0,
},
"Standard_D48ds_v4": {
InstanceType: "Standard_D48ds_v4",
VCPU: 48,
Expand Down Expand Up @@ -826,6 +850,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 16384,
GPU: 0,
},
"Standard_D4darm_V3": {
InstanceType: "Standard_D4darm_V3",
VCPU: 4,
MemoryMb: 16384,
GPU: 0,
},
"Standard_D4ds_v4": {
InstanceType: "Standard_D4ds_v4",
VCPU: 4,
Expand Down Expand Up @@ -1030,6 +1060,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 32768,
GPU: 0,
},
"Standard_D8darm_V3": {
InstanceType: "Standard_D8darm_V3",
VCPU: 8,
MemoryMb: 32768,
GPU: 0,
},
"Standard_D8ds_v4": {
InstanceType: "Standard_D8ds_v4",
VCPU: 8,
Expand Down Expand Up @@ -1558,6 +1594,18 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 688128,
GPU: 0,
},
"Standard_E112iads_v5": {
InstanceType: "Standard_E112iads_v5",
VCPU: 112,
MemoryMb: 688128,
GPU: 0,
},
"Standard_E112ias_v5": {
InstanceType: "Standard_E112ias_v5",
VCPU: 112,
MemoryMb: 688128,
GPU: 0,
},
"Standard_E16-4ads_v5": {
InstanceType: "Standard_E16-4ads_v5",
VCPU: 16,
Expand Down Expand Up @@ -1708,6 +1756,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 131072,
GPU: 0,
},
"Standard_E16darm_V3": {
InstanceType: "Standard_E16darm_V3",
VCPU: 16,
MemoryMb: 131072,
GPU: 0,
},
"Standard_E16ds_v4": {
InstanceType: "Standard_E16ds_v4",
VCPU: 16,
Expand Down Expand Up @@ -1792,6 +1846,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 163840,
GPU: 0,
},
"Standard_E20darm_V3": {
InstanceType: "Standard_E20darm_V3",
VCPU: 20,
MemoryMb: 163840,
GPU: 0,
},
"Standard_E20ds_v4": {
InstanceType: "Standard_E20ds_v4",
VCPU: 20,
Expand Down Expand Up @@ -1876,6 +1936,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 16384,
GPU: 0,
},
"Standard_E2darm_V3": {
InstanceType: "Standard_E2darm_V3",
VCPU: 2,
MemoryMb: 16384,
GPU: 0,
},
"Standard_E2ds_v4": {
InstanceType: "Standard_E2ds_v4",
VCPU: 2,
Expand Down Expand Up @@ -2056,6 +2122,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 262144,
GPU: 0,
},
"Standard_E32darm_V3": {
InstanceType: "Standard_E32darm_V3",
VCPU: 32,
MemoryMb: 262144,
GPU: 0,
},
"Standard_E32ds_v4": {
InstanceType: "Standard_E32ds_v4",
VCPU: 32,
Expand Down Expand Up @@ -2188,6 +2260,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 393216,
GPU: 0,
},
"Standard_E48darm_V3": {
InstanceType: "Standard_E48darm_V3",
VCPU: 48,
MemoryMb: 393216,
GPU: 0,
},
"Standard_E48ds_v4": {
InstanceType: "Standard_E48ds_v4",
VCPU: 48,
Expand Down Expand Up @@ -2272,6 +2350,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 32768,
GPU: 0,
},
"Standard_E4darm_V3": {
InstanceType: "Standard_E4darm_V3",
VCPU: 4,
MemoryMb: 32768,
GPU: 0,
},
"Standard_E4ds_v4": {
InstanceType: "Standard_E4ds_v4",
VCPU: 4,
Expand Down Expand Up @@ -2656,6 +2740,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 65536,
GPU: 0,
},
"Standard_E8darm_V3": {
InstanceType: "Standard_E8darm_V3",
VCPU: 8,
MemoryMb: 65536,
GPU: 0,
},
"Standard_E8ds_v4": {
InstanceType: "Standard_E8ds_v4",
VCPU: 8,
Expand Down Expand Up @@ -2788,6 +2878,12 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 688128,
GPU: 0,
},
"Standard_E96ias_v4": {
InstanceType: "Standard_E96ias_v4",
VCPU: 96,
MemoryMb: 688128,
GPU: 0,
},
"Standard_E96s_v5": {
InstanceType: "Standard_E96s_v5",
VCPU: 96,
Expand Down Expand Up @@ -3244,12 +3340,42 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 458752,
GPU: 0,
},
"Standard_HB60-15rs": {
InstanceType: "Standard_HB60-15rs",
VCPU: 60,
MemoryMb: 233472,
GPU: 0,
},
"Standard_HB60-30rs": {
InstanceType: "Standard_HB60-30rs",
VCPU: 60,
MemoryMb: 233472,
GPU: 0,
},
"Standard_HB60-45rs": {
InstanceType: "Standard_HB60-45rs",
VCPU: 60,
MemoryMb: 233472,
GPU: 0,
},
"Standard_HB60rs": {
InstanceType: "Standard_HB60rs",
VCPU: 60,
MemoryMb: 233472,
GPU: 0,
},
"Standard_HC44-16rs": {
InstanceType: "Standard_HC44-16rs",
VCPU: 44,
MemoryMb: 360448,
GPU: 0,
},
"Standard_HC44-32rs": {
InstanceType: "Standard_HC44-32rs",
VCPU: 44,
MemoryMb: 360448,
GPU: 0,
},
"Standard_HC44rs": {
InstanceType: "Standard_HC44rs",
VCPU: 44,
Expand Down Expand Up @@ -3742,6 +3868,24 @@ var InstanceTypes = map[string]*InstanceType{
MemoryMb: 921600,
GPU: 8,
},
"Standard_NP10s": {
InstanceType: "Standard_NP10s",
VCPU: 10,
MemoryMb: 172032,
GPU: 1,
},
"Standard_NP20s": {
InstanceType: "Standard_NP20s",
VCPU: 20,
MemoryMb: 344064,
GPU: 2,
},
"Standard_NP40s": {
InstanceType: "Standard_NP40s",
VCPU: 40,
MemoryMb: 688128,
GPU: 4,
},
"Standard_NV12": {
InstanceType: "Standard_NV12",
VCPU: 12,
Expand Down
12 changes: 11 additions & 1 deletion cluster-autoscaler/cloudprovider/azure/azure_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ func buildNodeFromTemplate(scaleSetName string, template compute.VirtualMachineS
}
node.Status.Capacity[apiv1.ResourcePods] = *resource.NewQuantity(110, resource.DecimalSI)
node.Status.Capacity[apiv1.ResourceCPU] = *resource.NewQuantity(vmssType.VCPU, resource.DecimalSI)
node.Status.Capacity[gpu.ResourceNvidiaGPU] = *resource.NewQuantity(vmssType.GPU, resource.DecimalSI)
// isNPSeries returns if a SKU is an NP-series SKU
// SKU API reports GPUs for NP-series but it's actually FPGAs
if !isNPSeries(*template.Sku.Name) {
node.Status.Capacity[gpu.ResourceNvidiaGPU] = *resource.NewQuantity(vmssType.GPU, resource.DecimalSI)
Copy link
Member Author

Choose a reason for hiding this comment

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

}
node.Status.Capacity[apiv1.ResourceMemory] = *resource.NewQuantity(vmssType.MemoryMb*1024*1024, resource.DecimalSI)

resourcesFromTags := extractAllocatableResourcesFromScaleSet(template.Tags)
Expand Down Expand Up @@ -255,3 +259,9 @@ func extractAllocatableResourcesFromScaleSet(tags map[string]*string) map[string

return resources
}

// isNPSeries returns if a SKU is an NP-series SKU
// SKU API reports GPUs for NP-series but it's actually FPGAs
func isNPSeries(name string) bool {
return strings.HasPrefix(strings.ToLower(name), "standard_np")
}