mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 05:46:37 +00:00
Extract providers (#1985)
* Remove cloud providers and reorg code Signed-off-by: Carlisia <carlisia@vmware.com> * Update dependencies Signed-off-by: Carlisia <carlisia@vmware.com> * Fix tests Signed-off-by: Carlisia <carlisia@vmware.com> * fix dependency issues Signed-off-by: Carlisia <carlisia@vmware.com> * Delete dup test Signed-off-by: Carlisia <carlisia@vmware.com> * Add back spaces to file Signed-off-by: Carlisia <carlisia@vmware.com> * Remove and update docs Signed-off-by: Carlisia <carlisia@vmware.com> * Make the plugins flag required Signed-off-by: Carlisia <carlisia@vmware.com> * Add changelog Signed-off-by: Carlisia <carlisia@vmware.com> * Make the plugins flag conditional Signed-off-by: Carlisia <carlisia@vmware.com>
This commit is contained in:
committed by
Adnan Abdulhussein
parent
69f993aebd
commit
d26bf05b33
@@ -22,9 +22,6 @@ import (
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/backup"
|
||||
"github.com/vmware-tanzu/velero/pkg/client"
|
||||
"github.com/vmware-tanzu/velero/pkg/cloudprovider/aws"
|
||||
"github.com/vmware-tanzu/velero/pkg/cloudprovider/azure"
|
||||
"github.com/vmware-tanzu/velero/pkg/cloudprovider/gcp"
|
||||
velerodiscovery "github.com/vmware-tanzu/velero/pkg/discovery"
|
||||
veleroplugin "github.com/vmware-tanzu/velero/pkg/plugin/framework"
|
||||
"github.com/vmware-tanzu/velero/pkg/restore"
|
||||
@@ -38,12 +35,6 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
Short: "INTERNAL COMMAND ONLY - not intended to be run directly by users",
|
||||
Run: func(c *cobra.Command, args []string) {
|
||||
pluginServer.
|
||||
RegisterObjectStore("velero.io/aws", newAwsObjectStore).
|
||||
RegisterObjectStore("velero.io/azure", newAzureObjectStore).
|
||||
RegisterObjectStore("velero.io/gcp", newGcpObjectStore).
|
||||
RegisterVolumeSnapshotter("velero.io/aws", newAwsVolumeSnapshotter).
|
||||
RegisterVolumeSnapshotter("velero.io/azure", newAzureVolumeSnapshotter).
|
||||
RegisterVolumeSnapshotter("velero.io/gcp", newGcpVolumeSnapshotter).
|
||||
RegisterBackupItemAction("velero.io/pv", newPVBackupItemAction).
|
||||
RegisterBackupItemAction("velero.io/pod", newPodBackupItemAction).
|
||||
RegisterBackupItemAction("velero.io/service-account", newServiceAccountBackupItemAction(f)).
|
||||
@@ -66,30 +57,6 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
return c
|
||||
}
|
||||
|
||||
func newAwsObjectStore(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return aws.NewObjectStore(logger), nil
|
||||
}
|
||||
|
||||
func newAzureObjectStore(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return azure.NewObjectStore(logger), nil
|
||||
}
|
||||
|
||||
func newGcpObjectStore(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return gcp.NewObjectStore(logger), nil
|
||||
}
|
||||
|
||||
func newAwsVolumeSnapshotter(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return aws.NewVolumeSnapshotter(logger), nil
|
||||
}
|
||||
|
||||
func newAzureVolumeSnapshotter(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return azure.NewVolumeSnapshotter(logger), nil
|
||||
}
|
||||
|
||||
func newGcpVolumeSnapshotter(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return gcp.NewVolumeSnapshotter(logger), nil
|
||||
}
|
||||
|
||||
func newPVBackupItemAction(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return backup.NewPVCAction(logger), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user