Skip to content

Commit 9e6526a

Browse files
authored
Merge pull request #2120 from hajiler/attach-limit-fix-branch
Add c4d to gen4 attach limit list
2 parents 28f5cc8 + ff18b2a commit 9e6526a

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-32",
345+
machineType: "c4d-standard-32",
346+
expVolumeLimit: 49,
347+
},
343348
}
344349

345350
for _, tc := range testCases {

0 commit comments

Comments
 (0)