diff --git a/pkg/restic/config.go b/pkg/restic/config.go index ecf769a68..440c01512 100644 --- a/pkg/restic/config.go +++ b/pkg/restic/config.go @@ -29,9 +29,9 @@ import ( type BackendType string const ( - AWSBackend BackendType = "aws" - AzureBackend BackendType = "azure" - GCPBackend BackendType = "gcp" + AWSBackend BackendType = "velero.io/aws" + AzureBackend BackendType = "velero.io/azure" + GCPBackend BackendType = "velero.io/gcp" ) // this func is assigned to a package-level variable so it can be @@ -51,7 +51,12 @@ func getRepoPrefix(location *velerov1api.BackupStorageLocation) string { } bucketAndPrefix = path.Join(bucket, prefix) - switch BackendType(location.Spec.Provider) { + var locationSpecProvider = location.Spec.Provider + if !strings.Contains(locationSpecProvider, "/") { + locationSpecProvider = "velero.io/" + locationSpecProvider + } + + switch BackendType(locationSpecProvider) { case AWSBackend: var url string switch {