mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
continue searching on bad size and add tests for bad size&mode
This commit is contained in:
@@ -119,11 +119,11 @@ func (pvIndex *persistentVolumeOrderedIndex) findByClaim(claim *api.PersistentVo
|
||||
if isVolumeBoundToClaim(volume, claim) {
|
||||
// this claim and volume are pre-bound; return
|
||||
// the volume if the size request is satisfied,
|
||||
// otherwise leave the claim pending
|
||||
// otherwise continue searching for a match
|
||||
volumeQty := volume.Spec.Capacity[api.ResourceStorage]
|
||||
volumeSize := volumeQty.Value()
|
||||
if volumeSize < requestedSize {
|
||||
return nil, nil
|
||||
continue
|
||||
}
|
||||
return volume, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user