Merge pull request #6539 from Lyndon-Li/release-1.10

[release-1.10] fix issue 6534
This commit is contained in:
lyndon
2023-07-25 18:44:16 +08:00
committed by GitHub
3 changed files with 6 additions and 0 deletions

View File

@@ -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)

View File

@@ -0,0 +1 @@
Fix issue #6534, reset PVB CR's StorageLocation to the latest one during backup sync as same as the backup CR

View File

@@ -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 {