Merge pull request #104 from oleksiys/master

Use discovered storageclassName to look up the storage class
This commit is contained in:
Kubernetes Prow Robot
2019-04-16 18:44:03 -07:00
committed by GitHub

View File

@@ -880,7 +880,7 @@ func (ctrl *csiSnapshotController) getStorageClassFromVolumeSnapshot(snapshot *c
if len(storageclassName) == 0 {
return nil, fmt.Errorf("cannot figure out the snapshot class automatically, please specify one in snapshot spec")
}
storageclass, err := ctrl.client.StorageV1().StorageClasses().Get(*pvc.Spec.StorageClassName, metav1.GetOptions{})
storageclass, err := ctrl.client.StorageV1().StorageClasses().Get(storageclassName, metav1.GetOptions{})
if err != nil {
return nil, err
}