Merge pull request #112344 from zlabjp/fix-invalid-attach-limit

Fix incorrect "Invalid attach limit" error when maxAttachLimit is 0
This commit is contained in:
Kubernetes Prow Robot
2022-11-09 08:30:13 -08:00
committed by GitHub

View File

@@ -557,7 +557,7 @@ func (nim *nodeInfoManager) installDriverToCSINode(
}
m := int32(maxAttachLimit)
driverSpec.Allocatable = &storagev1.VolumeNodeResources{Count: &m}
} else {
} else if maxAttachLimit != 0 {
klog.Errorf("Invalid attach limit value %d cannot be added to CSINode object for %q", maxAttachLimit, driverName)
}