-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Select namespace to include by its labelSelector #7492
Comments
@kaovilai |
Ok. I think we can make it work within 7105. If user label a namespace to backup, I think they would want everything in it.. thus it should behave equivalently to includedNamespaces. No need for new flag. |
The PR #7697 addresses this requirement. |
Re closing as completed per 7697. |
tbh after checking that PR, I still don't get how to backup selected namespaces upon their label. |
@muellerfabi
|
Which is equivalent to |
Say there is a namespace |
Describe the problem/challenge you have
includedNamespacesByLabelSelector
Equivalent toincludedNamespaces
in Backup/Restore CR but not by name, but namespace's labelSelector.User would not have to label each item inside the namespace, they can update which namespaces have this label, which on a future run manually or via schedule, could desirably result in different list of namespaces being included.
Not to be confused with #7105 which wants to exclude namespaces not containing backup items selected by label.
Describe the solution you'd like
Since backup can only be run once, we can reasonbly expect velero to annotate the backup to communicate what namespaces were in at backup time.
option 1: User who want to rerun a backup when list of namespaces with label changed will have to remove includedNamespaces field if any. velero update includedNamespaces to be result of namespaces in the backup
option 2: includedNamespacesByLabelSelector is additive to but will not modify includedNamespaces backup spec
option 3: includedNamespacesByLabelSelector is additive to and will update includedNamespaces backup spec
option 4: includedNamespacesByLabelSelector always overrides includedNamespaces backup spec
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.
Hackaround
and if you need this to be a schedule, can probably also wrap this into a kubernetes cronjob
The text was updated successfully, but these errors were encountered: