diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2fa7e833d..f4a66e7d4 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -64,6 +64,10 @@ jobs: - name: Publish container image if: github.repository == 'vmware-tanzu/velero' run: | + sudo swapoff -a + sudo rm -f /mnt/swapfile + docker image prune -a --force + # Build and push Velero image to docker registry docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} VERSION=$(./hack/docker-push.sh | grep 'VERSION:' | awk -F: '{print $2}' | xargs) diff --git a/changelogs/unreleased/6539-Lyndon-Li b/changelogs/unreleased/6539-Lyndon-Li new file mode 100644 index 000000000..8a55fd758 --- /dev/null +++ b/changelogs/unreleased/6539-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 d29a58641..5577ee960 100644 --- a/pkg/controller/backup_sync_controller.go +++ b/pkg/controller/backup_sync_controller.go @@ -197,6 +197,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 {