Skip to content

Add Multiple label selector support to Velero Backup/Restore API #4843

@shubham-pampattiwar

Description

@shubham-pampattiwar

Describe the problem/challenge you have
As of today Velero supports filtering of resources based on single label selector per backup. It is desired that Velero
support backing up of resources based on multiple labels (OR logic).
Currently, Velero's Backup/Restore API has a spec field LabelSelector which helps in filtering of resources based on
a single label value per backup/restore request. For instance, if the user specifies the Backup.Spec.LabelSelector as
data-protection-app: true, Velero will grab all the resources that possess this label and perform the backup
operation on them. The LabelSelector field does not accept more than one labels, and thus if the user want to take
backup for resources consisting of a label from a set of labels (label1 OR label2 OR label3) then the user needs to
create multiple backups per label rule. It would be really useful if Velero Backup API could respect a set of
labels (OR Rule) for a single backup request.

Describe the solution you'd like
Enable support for backing up/restoring resources based on multiple labels (OR Logic) in a single backup config.

Note: This solution is required because kubernetes label selectors only allow AND logic of labels.

Anything else you would like to add:
Related issue: #1508

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.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions