Skip to content

Commit 5be1c68

Browse files
committed
Add c4d to gen4 attach limit list
1 parent 28f5cc8 commit 5be1c68

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

pkg/gce-pd-csi-driver/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ func (ns *GCENodeServer) GetVolumeLimits(ctx context.Context) (int64, error) {
848848
}
849849

850850
// Process gen4 machine attach limits
851-
gen4MachineTypesPrefix := []string{"c4a-", "c4-", "n4-"}
851+
gen4MachineTypesPrefix := []string{"c4a-", "c4-", "n4-", "c4d-"}
852852
for _, gen4Prefix := range gen4MachineTypesPrefix {
853853
if strings.HasPrefix(machineType, gen4Prefix) {
854854
machineTypeSlice := strings.Split(machineType, "-")

pkg/gce-pd-csi-driver/node_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,14 @@ func TestNodeGetVolumeLimits(t *testing.T) {
336336
expVolumeLimit: volumeLimitBig,
337337
},
338338
{
339-
name: "c4a-standard-32-lssd",
340-
machineType: "c4a-standard-32-lssd",
341-
expVolumeLimit: 49,
339+
name: "c4a-standard-2-lssd",
340+
machineType: "c4a-standard-2-lssd",
341+
expVolumeLimit: volumeLimitSmall,
342+
},
343+
{
344+
name: "c4d-standard-2",
345+
machineType: "c4d-standard-2",
346+
expVolumeLimit: volumeLimitSmall,
342347
},
343348
}
344349

0 commit comments

Comments
 (0)