Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewVeleroProvider = func(k8sClient K8sClient, ecosystemClientSet EcosystemClientSet, recorder EventRecorder, namespace string) Provider { return velero.NewDefaultProvider(k8sClient, ecosystemClientSet.Discovery(), namespace, recorder) }
Functions ¶
This section is empty.
Types ¶
type EcosystemClientSet ¶ added in v0.7.0
type EventRecorder ¶
type EventRecorder interface {
record.EventRecorder
}
EventRecorder provides functionality to commit events to kubernetes resources.
type Provider ¶
type Provider interface {
// CreateBackup creates backup according to the backup configuration in v1.Backup.
CreateBackup(ctx context.Context, backup *v1.Backup) error
// DeleteBackup deletes backup from the cluster state and the backup storage.
DeleteBackup(ctx context.Context, backup *v1.Backup) error
// CheckReady validates if the provider is ready to receive backup requests.
CheckReady(ctx context.Context) error
// CreateRestore creates a restore according to the restore configuration in v1.Restore.
CreateRestore(ctx context.Context, restore *v1.Restore) error
// DeleteRestore just deletes the provider restore object.
DeleteRestore(ctx context.Context, restore *v1.Restore) error
// SyncBackups syncs backup CRs with provider backups.
SyncBackups(ctx context.Context) error
// SyncBackupStatus syncs the status of the backup CR with the corresponding provider backup.
// The provider backup must be completed or an error is thrown.
SyncBackupStatus(ctx context.Context, backup *v1.Backup) error
}
Provider encapsulates different provider like velero.
func Get ¶ added in v0.8.0
func Get(ctx context.Context, object runtime.Object, name k8sv1.Provider, namespace string, recorder EventRecorder, k8sClient K8sClient, ecosystemClientSet EcosystemClientSet) (Provider, error)
Get returns the provider by the given name and calls a function on the provider object to check if it is ready.
func GetAll ¶ added in v0.8.0
func GetAll(ctx context.Context, namespace string, recorder EventRecorder, k8sClient K8sClient, ecosystemClientSet EcosystemClientSet) []Provider
GetAll returns all known providers that are functional and ready.
Click to show internal directories.
Click to hide internal directories.