From 356e0f7a4e3a57e84877d0472c0bfb09b05a78a0 Mon Sep 17 00:00:00 2001 From: ArielLima Date: Thu, 15 Sep 2022 11:42:38 -0600 Subject: [PATCH] add gpu instance types --- pkg/api/openshiftcluster.go | 6 ++++++ pkg/api/validate/dynamic/quota.go | 6 ++++++ pkg/api/validate/vm.go | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/pkg/api/openshiftcluster.go b/pkg/api/openshiftcluster.go index dac969e6e..fc8232f82 100644 --- a/pkg/api/openshiftcluster.go +++ b/pkg/api/openshiftcluster.go @@ -330,6 +330,12 @@ const ( VMSizeStandardL32sV2 VMSize = "Standard_L32s_v2" VMSizeStandardL48sV2 VMSize = "Standard_L48s_v2" VMSizeStandardL64sV2 VMSize = "Standard_L64s_v2" + + // GPU VMs + VMSizeStandardNC4asT4V3 VMSize = "Standard_NC4as_T4_v3" + VMSizeStandardNC8asT4V3 VMSize = "Standard_NC8as_T4_v3" + VMSizeStandardNC16asT4V3 VMSize = "Standard_NC16as_T4_v3" + VMSizeStandardNC64asT4V3 VMSize = "Standard_NC64as_T4_v3" ) // WorkerProfile represents a worker profile diff --git a/pkg/api/validate/dynamic/quota.go b/pkg/api/validate/dynamic/quota.go index 61edc8c74..57d4c007c 100644 --- a/pkg/api/validate/dynamic/quota.go +++ b/pkg/api/validate/dynamic/quota.go @@ -60,6 +60,12 @@ func addRequiredResources(requiredResources map[string]int, vmSize api.VMSize, c api.VMSizeStandardL32sV2: {CoreCount: 32, Family: "standardLsv2Family"}, api.VMSizeStandardL48sV2: {CoreCount: 48, Family: "standardLsv2Family"}, api.VMSizeStandardL64sV2: {CoreCount: 64, Family: "standardLsv2Family"}, + + // GPU nodes + api.VMSizeStandardNC4asT4V3: {CoreCount: 4, Family: "Standard_NC4as_T4_v3"}, + api.VMSizeStandardNC8asT4V3: {CoreCount: 8, Family: "Standard_NC8as_T4_v3"}, + api.VMSizeStandardNC16asT4V3: {CoreCount: 16, Family: "Standard_NC16as_T4_v3"}, + api.VMSizeStandardNC64asT4V3: {CoreCount: 64, Family: "Standard_NC64as_T4_v3"}, } vm, ok := vmTypesMap[vmSize] diff --git a/pkg/api/validate/vm.go b/pkg/api/validate/vm.go index 88da91571..d59ca7d36 100644 --- a/pkg/api/validate/vm.go +++ b/pkg/api/validate/vm.go @@ -74,6 +74,11 @@ var supportedWorkerVMSizes = map[api.VMSize]bool{ api.VMSizeStandardL32sV2: true, api.VMSizeStandardL48sV2: true, api.VMSizeStandardL64sV2: true, + // GPU + api.VMSizeStandardNC4asT4V3: true, + api.VMSizeStandardNC8asT4V3: true, + api.VMSizeStandardNC16asT4V3: true, + api.VMSizeStandardNC64asT4V3: true, } func DiskSizeIsValid(sizeGB int) bool {