Fix incorrect "Invalid attach limit" error when maxAttachLimit is 0

This commit is contained in:
Takashi Kusumi 2022-09-09 09:32:51 +09:00
parent 082da2f04e
commit b35ea96d9a

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)
}