-
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
Backup skipped PriorityClass even when it is referenced by Pod #3933
Comments
Per discussion, this can be fixed by introducing a backupItemAction in core velero. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We actually still need this. Instead of writing new plugin, we will enhance the currently internal plugin the backup the PriorityClass if the Pod Spec has reference to it. |
Closing the stale issue. |
This is discussed in the meeting today. We still need it. |
Currently, in the internal plugin for Backup's PodAction, https://github.com/vmware-tanzu/velero/blob/main/pkg/backup/pod_action.go we only add PVCs to the "additionalItems" array. We could add PriorityClass as in that array as well. |
@phuongatemc Yes, that makes sense. While "make it a BackupItemAction" was proposed above, I think using an existing BackupItemAction that's already being run for pods probably makes even more sense, as we don't really need to run a completely separate action to add more than one type of resources as additional items. |
PR: #4740 |
Steps to reproduce:
time="2021-07-06T23:01:42Z" level=info msg="Getting items for resource" backup=velero-ppdm/mysql-2021-07-06-16-01-40-mysql group=scheduling.k8s.io/v1 logSource="pkg/backup/item_collector.go:165" resource=priorityclasses
time="2021-07-06T23:01:42Z" level=info msg="Skipping resource because it's cluster-scoped and only specific namespaces are included in the backup" backup=velero-ppdm/mysql-2021-07-06-16-01-40-mysql group=scheduling.k8s.io/v1 logSource="pkg/backup/item_collector.go:192" resource=priorityclasses
There was an suggestion in Velero community meeting and in the code comments to write a plugin for Pod and return the PriorityClass high-priority as the AdditionalItems to backup. However, I think such plugin would be a workaround because the main problem is the Backup datapath (getResourceItems in specific) should pick up all resources being referenced by the Pod and backup them accordingly.
The text was updated successfully, but these errors were encountered: