From b08e9b173ee1c609ee3a3c84e0c2a6d4ac99ebdb Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Thu, 30 Jun 2022 11:14:40 +0800 Subject: [PATCH] Exclude "csinodes.storage.k8s.io" and "volumeattachments.storage.k8s.io" from backup and restore by default. Signed-off-by: Xun Jiang --- changelogs/unreleased/5064-jxun | 1 + pkg/controller/restore_controller.go | 6 ++++++ 2 files changed, 7 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 00000000000..d28626fa8f2 --- /dev/null +++ b/changelogs/unreleased/5064-jxun @@ -0,0 +1 @@ +Exclude "csinodes.storage.k8s.io" and "volumeattachments.storage.k8s.io" from backup and restore by default. \ No newline at end of file diff --git a/pkg/controller/restore_controller.go b/pkg/controller/restore_controller.go index 092b90002fc..fee17e184be 100644 --- a/pkg/controller/restore_controller.go +++ b/pkg/controller/restore_controller.go @@ -75,6 +75,12 @@ var nonRestorableResources = []string{ // created as needed if they don't exist. // https://github.com/vmware-tanzu/velero/issues/1113 "resticrepositories.velero.io", + + // CSINode delegate cluster node in CSI volume mount. + // VolumeAttachement specifies PV mounts to which node. + // https://github.com/vmware-tanzu/velero/issues/4823 + "csinodes.storage.k8s.io", + "volumeattachments.storage.k8s.io", } type restoreController struct {