use region input to detect the Bucket region
Signed-off-by: Jalaja Ganapathy <jalaja@replicated.com> Signed-off-by: Jalaja <jalaja@replicated.com>pull/3617/head
parent
e9c997839e
commit
40a1b62c09
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue