Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#7253 from learner0810/fix-pvc-assignment
Browse files Browse the repository at this point in the history
Fix pvc assignment
  • Loading branch information
qiuming-best authored Jan 2, 2024
2 parents 78bd67a + 8c84836 commit f109f38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/podvolume/restorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (r *restorer) RestorePodVolumes(data RestoreData) []error {
var pvc *corev1api.PersistentVolumeClaim
if ok {
if volumeObj.PersistentVolumeClaim != nil {
pvc := new(corev1api.PersistentVolumeClaim)
pvc = new(corev1api.PersistentVolumeClaim)
err := r.crClient.Get(context.TODO(), ctrlclient.ObjectKey{Namespace: data.Pod.Namespace, Name: volumeObj.PersistentVolumeClaim.ClaimName}, pvc)
if err != nil {
errs = append(errs, errors.Wrap(err, "error getting persistent volume claim for volume"))
Expand Down

0 comments on commit f109f38

Please sign in to comment.