Skip to content

Commit a84c133

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

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ func TestNodeGetVolumeLimits(t *testing.T) {
340340
machineType: "c4a-standard-32-lssd",
341341
expVolumeLimit: 49,
342342
},
343+
{
344+
name: "c4d-standard-48",
345+
machineType: "c4d-standard-2",
346+
expVolumeLimit: volumeLimitSmall,
347+
},
343348
}
344349

345350
for _, tc := range testCases {

0 commit comments

Comments
 (0)