Skip to content

Commit 3d4db44

Browse files
authored
Merge pull request #104 from oleksiys/master
Use discovered storageclassName to look up the storage class
2 parents c15057c + 00a501d commit 3d4db44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/snapshot_controller.go

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

0 commit comments

Comments
 (0)