Fix restic repository identifier

Signed-off-by: Jason Montleon <jmontleo@redhat.com>
This commit is contained in:
Jason Montleon
2019-04-16 12:21:50 -04:00
parent 39bab5ada9
commit 8c9ae491f0

View File

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