diff --git a/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go b/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go index 12d78c4c495a..77a31a9208a1 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/cluster-autoscaler/cloudprovider/azure/azure_template.go b/cluster-autoscaler/cloudprovider/azure/azure_template.go index 77e542d9f264..14e4a0a848e2 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_template.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_template.go @@ -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) + } node.Status.Capacity[apiv1.ResourceMemory] = *resource.NewQuantity(vmssType.MemoryMb*1024*1024, resource.DecimalSI) resourcesFromTags := extractAllocatableResourcesFromScaleSet(template.Tags) @@ -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") +}