mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 14:34:17 +00:00
add ResticRepository CRD and move repo-level actions to a controller
Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
@@ -31,6 +31,7 @@ type arkConfig struct {
|
||||
gcSyncPeriod time.Duration
|
||||
podVolumeOperationTimeout time.Duration
|
||||
restoreOnly bool
|
||||
resticLocation string
|
||||
}
|
||||
|
||||
func WithBackupSyncPeriod(t time.Duration) arkConfigOption {
|
||||
@@ -57,6 +58,12 @@ func WithRestoreOnly() arkConfigOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithResticLocation(location string) arkConfigOption {
|
||||
return func(c *arkConfig) {
|
||||
c.resticLocation = location
|
||||
}
|
||||
}
|
||||
|
||||
func Config(
|
||||
namespace string,
|
||||
pvCloudProviderName string,
|
||||
@@ -87,7 +94,8 @@ func Config(
|
||||
Name: backupCloudProviderName,
|
||||
Config: backupCloudProviderConfig,
|
||||
},
|
||||
Bucket: bucket,
|
||||
Bucket: bucket,
|
||||
ResticLocation: c.resticLocation,
|
||||
},
|
||||
BackupSyncPeriod: metav1.Duration{
|
||||
Duration: c.backupSyncPeriod,
|
||||
|
||||
@@ -36,6 +36,7 @@ func CRDs() []*apiextv1beta1.CustomResourceDefinition {
|
||||
crd("DeleteBackupRequest", "deletebackuprequests"),
|
||||
crd("PodVolumeBackup", "podvolumebackups"),
|
||||
crd("PodVolumeRestore", "podvolumerestores"),
|
||||
crd("ResticRepository", "resticrepositories"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user