velero icon indicating copy to clipboard operation
velero copied to clipboard

(GCP): Add an ability to change the destination AZ while restoring.

Open tuusberg opened this issue 5 months ago • 0 comments

Describe the problem/challenge you have

We are using Velero to restore volumes from our production cluster that spans across multiple AZs to our dev cluster which is single-AZ for costs reasons. We tried using a StorageClass with topology constraints but it didn't work because the plugin always uses the source AZ when it creates volumes from volume snapshots. We need a way to override the default AZ for restores to dev cluster.

More than happy to open a PR as I believe I know how to add this functionality to the plugin with a few lines of code.

Describe the solution you'd like

A possible solution would be:

  1. Configure the AZ override via plugin configuration.
  2. Check for the override inside CreateVolumeFromSnapshot method and replace volumeAZ value with the one provided by user.

Anything else you would like to add:

Environment:

  • Velero version (use velero version): 1.14
  • Kubernetes version (use kubectl version): v1.29.7-gke.1104000
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration: GKE
  • OS (e.g. from /etc/os-release): Container-Optimized OS with containerd

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • :+1: for "The project would be better with this feature added"
  • :-1: for "This feature will not enhance the project in a meaningful way"

tuusberg avatar Sep 25 '24 17:09 tuusberg