mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-15 19:56:06 +00:00
use region input to detect the Bucket region
Signed-off-by: Jalaja Ganapathy <jalaja@replicated.com> Signed-off-by: Jalaja <jalaja@replicated.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Region is calculated incorrectly when gov account is used.
|
||||
@@ -64,10 +64,14 @@ func getRepoPrefix(location *velerov1api.BackupStorageLocation) (string, error)
|
||||
switch backendType {
|
||||
case AWSBackend:
|
||||
var url string
|
||||
var region string
|
||||
switch {
|
||||
// non-AWS, S3-compatible object store
|
||||
case location.Spec.Config["s3Url"] != "":
|
||||
url = location.Spec.Config["s3Url"]
|
||||
case location.Spec.Config["region"] != "":
|
||||
region = location.Spec.Config["region"]
|
||||
url = fmt.Sprintf("s3-%s.amazonaws.com", region)
|
||||
default:
|
||||
region, err := getAWSBucketRegion(bucket)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user