If the backup's namespace filter has excluded rules, but no include rules, based on the current code, the item collector will collect name-scoped resources in all namespaces.
This is inefficient, but not a bug, because the backup process will check the namespace filter again later.
Describe the solution you'd like
It should be more efficient.
Anything else you would like to add:
Environment:
Velero version (use velero version):
Kubernetes version (use kubectl version):
Kubernetes installer & version:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.
:+1: for "The project would be better with this feature added"
:-1: for "This feature will not enhance the project in a meaningful way"
Describe the problem/challenge you have
https://github.com/vmware-tanzu/velero/blob/f04fbbcc41d1e5c5802699c6f1efc964431248f6/pkg/backup/item_collector.go#L295
https://github.com/vmware-tanzu/velero/blob/f04fbbcc41d1e5c5802699c6f1efc964431248f6/pkg/backup/item_collector.go#L438-L459 During item collecting, the resource collecting is inefficient on the namespace filtering.
If the backup's namespace filter has excluded rules, but no include rules, based on the current code, the item collector will collect name-scoped resources in all namespaces. This is inefficient, but not a bug, because the backup process will check the namespace filter again later.
Describe the solution you'd like
It should be more efficient.
Anything else you would like to add:
Environment:
velero version
):kubectl version
):/etc/os-release
):Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.