mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 15:04:17 +00:00
Fix restore error with flag namespace-mappings (#5377)
Signed-off-by: Ming <mqiu@vmware.com>
This commit is contained in:
@@ -249,8 +249,10 @@ func (c *PodVolumeRestoreReconciler) processRestore(ctx context.Context, req *ve
|
||||
return errors.Wrap(err, "error getting backup storage location")
|
||||
}
|
||||
|
||||
// need to check backup repository in source namespace rather than in pod namespace
|
||||
// such as in case of namespace mapping issue
|
||||
backupRepo, err := repository.GetBackupRepository(ctx, c.Client, req.Namespace, repository.BackupRepositoryKey{
|
||||
VolumeNamespace: req.Spec.Pod.Namespace,
|
||||
VolumeNamespace: req.Spec.SourceNamespace,
|
||||
BackupLocation: req.Spec.BackupStorageLocation,
|
||||
RepositoryType: podvolume.GetPvrRepositoryType(req),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user