mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-04-17 14:11:11 +00:00
The `getDataUpload` function in the CSI PVC backup plugin was previously making a cluster-scoped list query to retrieve DataUpload CRs. In environments with strict minimum-privilege RBAC, this would fail with forbidden errors. This explicitly passes the backup namespace into the `ListOptions` when calling `crClient.List`, correctly scoping the queries to the backup's namespace. Unit tests have also been updated to ensure cross-namespace queries are rejected appropriately. Signed-off-by: Adam Zhang <adam.zhang@broadcom.com>