瀏覽代碼

Merge pull request #1662 from erbriones/fix-n2d-instance-support

Support high memory and high cpu n2d instances
Ajay Tripathy 3 年之前
父節點
當前提交
1de2e23701
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 2 0
      pkg/cloud/gcpprovider.go
  2. 4 0
      pkg/cloud/gcpprovider_test.go

+ 2 - 0
pkg/cloud/gcpprovider.go

@@ -1448,6 +1448,8 @@ func parseGCPInstanceTypeLabel(it string) string {
 			instanceType = "n2standard"
 		} else if instanceType == "e2highmem" || instanceType == "e2highcpu" {
 			instanceType = "e2standard"
+		} else if instanceType == "n2dhighmem" || instanceType == "n2dhighcpu" {
+			instanceType = "n2dstandard"
 		} else if strings.HasPrefix(instanceType, "custom") {
 			instanceType = "custom" // The suffix of custom does not matter
 		}

+ 4 - 0
pkg/cloud/gcpprovider_test.go

@@ -25,6 +25,10 @@ func TestParseGCPInstanceTypeLabel(t *testing.T) {
 			input:    "custom-n1-standard-2",
 			expected: "custom",
 		},
+		{
+			input:    "n2d-highmem-8",
+			expected: "n2dstandard",
+		},
 	}
 
 	for _, test := range cases {