From e90bcc18ef33612005a9eac34248192c2db10864 Mon Sep 17 00:00:00 2001 From: Lyndon-Li Date: Tue, 25 Jul 2023 17:28:12 +0800 Subject: [PATCH] fix issue 6534 Signed-off-by: Lyndon-Li --- changelogs/unreleased/6543-Lyndon-Li | 1 + pkg/controller/backup_sync_controller.go | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelogs/unreleased/6543-Lyndon-Li diff --git a/changelogs/unreleased/6543-Lyndon-Li b/changelogs/unreleased/6543-Lyndon-Li new file mode 100644 index 000000000..8a55fd758 --- /dev/null +++ b/changelogs/unreleased/6543-Lyndon-Li @@ -0,0 +1 @@ +Fix issue #6534, reset PVB CR's StorageLocation to the latest one during backup sync as same as the backup CR \ No newline at end of file diff --git a/pkg/controller/backup_sync_controller.go b/pkg/controller/backup_sync_controller.go index 4edc03e55..29e66a1a4 100644 --- a/pkg/controller/backup_sync_controller.go +++ b/pkg/controller/backup_sync_controller.go @@ -209,6 +209,7 @@ func (b *backupSyncReconciler) Reconcile(ctx context.Context, req ctrl.Request) podVolumeBackup.Namespace = backup.Namespace podVolumeBackup.ResourceVersion = "" + podVolumeBackup.Spec.BackupStorageLocation = location.Name err = b.client.Create(ctx, podVolumeBackup, &client.CreateOptions{}) switch {