Merge pull request #1377 from jmontleon/fix-restic-repo

Fix restic repository identifier
This commit is contained in:
Nolan Brubaker
2019-04-16 17:46:56 -04:00
committed by GitHub
+9 -4
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 {