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

Make resources to be excluded/included configurable #8610

Open
xing-yang opened this issue Jan 13, 2025 · 2 comments
Open

Make resources to be excluded/included configurable #8610

xing-yang opened this issue Jan 13, 2025 · 2 comments

Comments

@xing-yang
Copy link

Describe the problem/challenge you have

We have a way to filter resources by using -include-resources or -exclude-resources, but it is cumbersome and error prone if there is a large number of resources to be included/excluded.

Describe the solution you'd like

The request is to allow the user to put resources to be included/excluded in a configmap. This way it is easier to manage.

Anything else you would like to add:

Environment:

  • Velero version (use velero version): 1.15.1 and earlier
  • 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.

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

sseago commented Jan 13, 2025

Just to clarify the request -- this would be to provide all of the same fields as we currently have directly in backup.spec but accepted via a ConfigMap input, presumably so that the same list can be shared across backups?

One way to implement this would be to do it in the Velero client with no CRD changes to backups.velero.io -- velero backup create --include-exclude-configmap foo would parse the configmap and create the velero Backup CR with the spec fields populated exactly as it does now with the explicit include/exclude args. The CLI could either prohibit the configmap from being used along with the explicit include/exclude args, or it could treat explicit args as overrides to the configmap.

The other approach would be to add a new spec field for this configmap and pull the configmap contents at backup processing time. For backups created directly, the behavior would be roughly similar. For backup schedules, though, there would be an important difference. The client approach would set the includes/excludes at schedule creation time. The "add configmap to CRD" approach would set them at backup processing time. So for a daily schedule, modifying the configmap after schedule creation would affect future scheduled backups with this approach. With the client approach, modifying the configmap will only affect schedules created after the change.

@xing-yang
Copy link
Author

Just to clarify the request -- this would be to provide all of the same fields as we currently have directly in backup.spec but accepted via a ConfigMap input, presumably so that the same list can be shared across backups?

Yes.

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

4 participants