Revert "add pvcLister to snapshot controller"

This commit is contained in:
Xing Yang
2018-11-27 19:38:09 -05:00
committed by GitHub
parent a40dc65b96
commit 96b6f495d3
5 changed files with 4 additions and 25 deletions

View File

@@ -947,9 +947,9 @@ func (ctrl *csiSnapshotController) getClaimFromVolumeSnapshot(snapshot *crdv1.Vo
return nil, fmt.Errorf("the snapshot source does not have the right APIGroup. Expected empty string, Got %s", *(snapshot.Spec.Source.APIGroup))
}
pvc, err := ctrl.pvcLister.PersistentVolumeClaims(snapshot.Namespace).Get(pvcName)
pvc, err := ctrl.client.CoreV1().PersistentVolumeClaims(snapshot.Namespace).Get(pvcName, metav1.GetOptions{})
if err != nil {
return nil, fmt.Errorf("failed to retrieve PVC %s from the lister: %q", pvcName, err)
return nil, fmt.Errorf("failed to retrieve PVC %s from the API server: %q", pvcName, err)
}
return pvc, nil