mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 22:44:21 +00:00
Fix PodVolumeBackup list scope during restore
Restrict the listing of PodVolumeBackup resources to the specific restore namespace in both the core restore controller and the pod volume restore action plugin. This prevents "Forbidden" errors when Velero is configured with namespace-scoped minimum privileges, avoiding the need for cluster-scoped list permissions for PodVolumeBackups. Fixes: #9681 Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>
This commit is contained in:
@@ -529,6 +529,7 @@ func (r *restoreReconciler) runValidatedRestore(restore *api.Restore, info backu
|
||||
LabelSelector: labels.Set(map[string]string{
|
||||
api.BackupNameLabel: label.GetValidName(restore.Spec.BackupName),
|
||||
}).AsSelector(),
|
||||
Namespace: restore.Namespace,
|
||||
}
|
||||
|
||||
podVolumeBackupList := &api.PodVolumeBackupList{}
|
||||
|
||||
Reference in New Issue
Block a user