Make standalone function to check for (pre-)bound volumes.
Note the semantic change, we now check for UID=""
This commit is contained in:
@@ -92,8 +92,8 @@ func (pvIndex *persistentVolumeOrderedIndex) findByClaim(claim *api.PersistentVo
|
||||
continue
|
||||
}
|
||||
|
||||
if claim.Name == volume.Spec.ClaimRef.Name && claim.Namespace == volume.Spec.ClaimRef.Namespace && claim.UID == volume.Spec.ClaimRef.UID {
|
||||
// exact match! No search required.
|
||||
if isVolumeBoundToClaim(volume, claim) {
|
||||
// Exact match! No search required.
|
||||
return volume, nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user