Skip to content

Commit 8014a3b

Browse files
committed
CORS-3580: Add the hyperdisk-balanced disk type
** Add the hyperdisk-balanced disk type for gcp machines. ** Add the test to validate the new type.
1 parent 80301b1 commit 8014a3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/webhooks/machine_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ func validateGCPDisks(disks []*machinev1beta1.GCPDisk, parentPath *field.Path) f
13271327
}
13281328

13291329
if disk.Type != "" {
1330-
diskTypes := sets.NewString("pd-standard", "pd-ssd", "pd-balanced")
1330+
diskTypes := sets.NewString("pd-standard", "pd-ssd", "pd-balanced", "hyperdisk-balanced")
13311331
if !diskTypes.Has(disk.Type) {
13321332
errs = append(errs, field.NotSupported(fldPath.Child("type"), disk.Type, diskTypes.List()))
13331333
}

pkg/webhooks/machine_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3365,7 +3365,7 @@ func TestValidateGCPProviderSpec(t *testing.T) {
33653365
}
33663366
},
33673367
expectedOk: false,
3368-
expectedError: "providerSpec.disks[0].type: Unsupported value: \"invalid\": supported values: \"pd-balanced\", \"pd-ssd\", \"pd-standard\"",
3368+
expectedError: "providerSpec.disks[0].type: Unsupported value: \"invalid\": supported values: \"hyperdisk-balanced\", \"pd-balanced\", \"pd-ssd\", \"pd-standard\"",
33693369
},
33703370
{
33713371
testCase: "with a disk type that is supported",

0 commit comments

Comments
 (0)