Merge pull request #80460 from mrkm4ntr/pvc-class-name

Use v1helper.GetPersistentVolumeClaimClass for compatibility
This commit is contained in:
Kubernetes Prow Robot
2019-08-05 15:08:30 -07:00
committed by GitHub
2 changed files with 5 additions and 8 deletions

View File

@@ -665,11 +665,7 @@ func (b *volumeBinder) findMatchingVolumes(pod *v1.Pod, claimsToBind []*v1.Persi
for _, pvc := range claimsToBind {
// Get storage class name from each PVC
storageClassName := ""
storageClass := pvc.Spec.StorageClassName
if storageClass != nil {
storageClassName = *storageClass
}
storageClassName := v1helper.GetPersistentVolumeClaimClass(pvc)
allPVs := b.pvCache.ListPVs(storageClassName)
pvcName := getPVCName(pvc)