Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Custom Configuration to Enhance Resource Filtering in Velero #7815

Open
yuanqijing opened this issue May 23, 2024 · 5 comments
Open

Comments

@yuanqijing
Copy link

Describe the problem/challenge you have
Current resource filtering in Velero lacks flexibility, as highlighted in previous discussions (issues #5152 and #5842). This issue suggests the development of a custom resource filter plugin framework that allows users define their own rules for what gets backed up. This plugin would evaluate resources based on user-defined conditions(via annotations or else), enabling more precise control over the backup process.

Describe the solution you'd like

Add a new custom plugin point during resource filtering process.

Anything else you would like to add:

Expected Benefits:
Customization: Users can tailor backup rules to their specific needs.
Efficiency: Avoid backing up unnecessary resources, saving storage and reducing overhead

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"
@blackpiglet
Copy link
Contributor

blackpiglet commented May 23, 2024

https://velero.io/docs/main/resource-filtering/#resource-policies

Please check whether the resource policies can be the foundation of what you proposed.

@yuanqijing
Copy link
Author

https://velero.io/docs/main/resource-filtering/#resource-policies

Please check whether the resource policies can be the foundation of what you proposed.

Thank you for your reply. Regarding my scenario, the challenge I am facing is as follows: I have several pods, such as Pod1, Pod2, and Pod3, along with associated PVCs, They all have the same label. Currently, Velero's resource filtering mechanism does not seem to allow for backing up a specific pod (like just backup Pod1) unless it is labeled (selected via a selector). We prefer not to label pods as we consider it an intrusive way. I have reviewed the relevant documentation, including Velero's resource filtering section, but it appears there are no existing capabilities that meet this requirement.

The resource policies seem to apply filter policies specifically to PVCs. If my understanding is incorrect, please correct me.

@blackpiglet
Copy link
Contributor

blackpiglet commented May 24, 2024

You are right.
The current resource policy only supports filtering on the volumes, because it only has a sub-resource called volume policy.
My proposal was to extend the resource policy functionality to support your scenario.

@yuanqijing
Copy link
Author

You are right. The current resource policy only supports filtering on the volumes, because it only has a sub-resource called volume policy. My proposal was to extend the resource policy functionality to support your scenario.

Understood, I will consider how to extend the resource policy. I'll update this issue with any developments.

@reasonerjt reasonerjt changed the title Request for Custom Plugin to Enhance Resource Filtering in Velero Request for Custom Configuration to Enhance Resource Filtering in Velero Jun 21, 2024
@reasonerjt
Copy link
Contributor

I think this is a valid requirement, but we may not have bandwidth to implement it in v1.15 timeframe.

Let me keep this in the backlog. If you are interested to contribute please write a design and I'm happy to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants