From 4fad3b023b864f859e69e6ff1848c3edc7cd48f4 Mon Sep 17 00:00:00 2001 From: Swanand Shende Date: Thu, 20 Oct 2022 12:52:30 +0530 Subject: [PATCH] Exclude "csinodes.storage.k8s.io" and "volumeattachments.storage.k8s.io" from backup and restore by default. (#5064) Signed-off-by: Xun Jiang Signed-off-by: Xun Jiang Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com> --- changelogs/unreleased/5064-jxun | 1 + pkg/controller/restore_controller.go | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 changelogs/unreleased/5064-jxun diff --git a/changelogs/unreleased/5064-jxun b/changelogs/unreleased/5064-jxun new file mode 100644 index 0000000000..4de8a84605 --- /dev/null +++ b/changelogs/unreleased/5064-jxun @@ -0,0 +1 @@ +Exclude "csinodes.storage.k8s.io" and "volumeattachments.storage.k8s.io" from restore by default. \ No newline at end of file diff --git a/pkg/controller/restore_controller.go b/pkg/controller/restore_controller.go index 092b90002f..75767ebce4 100644 --- a/pkg/controller/restore_controller.go +++ b/pkg/controller/restore_controller.go @@ -75,6 +75,15 @@ var nonRestorableResources = []string{ // created as needed if they don't exist. // https://github.com/vmware-tanzu/velero/issues/1113 "resticrepositories.velero.io", + + // CSINode delegates cluster node for CSI operation. + // VolumeAttachement records PV mounts to which node. + // https://github.com/vmware-tanzu/velero/issues/4823 + "csinodes.storage.k8s.io", + "volumeattachments.storage.k8s.io", + + // Backup repositories were renamed from Restic repositories + "backuprepositories.velero.io", } type restoreController struct {