provider

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupProvider

type BackupProvider interface {
	// CreateBucket shall create a blob storage bucket.
	CreateBucket(ctx context.Context) error
	// DeleteBucket shall delete a blob storage bucket.
	DeleteBucket(ctx context.Context) error
	// BucketExists shall return whether the blob storage bucket exists.
	BucketExists(ctx context.Context) (bool, error)
	// ComputeETCDBackupConfiguration shall compute the configuration for the etcd-backup-restore sidecar container that
	// runs in the etcd statefulset. It takes the volume name of the etcd backup secret and should return the name of
	// the blob storage provider, the secret data for the etcd backup secret, and optional environment variables that
	// will be injected into the sidecar container.
	ComputeETCDBackupConfiguration(etcdBackupSecretVolumeName, etcdSecretNameBackup string) (storageProviderName string, secretData map[string][]byte, environment []corev1.EnvVar)
}

BackupProvider is an interface for backup providers.

func NewBackupProvider

func NewBackupProvider(providerType api.InfrastructureProviderType, credentials *api.Credentials, bucketName,
	region string, log *logrus.Logger) (BackupProvider, error)

NewBackupProvider returns a new InfrastructureProvider interface for the given provider type.

type InfrastructureProvider

type InfrastructureProvider interface {
	// ComputeStorageClassConfiguration shall return the Kubernetes volume provisioner name as well as optional
	// parameters for the storage class that can be used by etcd.
	ComputeStorageClassConfiguration() (provisioner string, parameters map[string]string)
	GetLoadBalancer(service *corev1.Service) string
	GetKubeAPIServerURL(kubeAPIServer *api.KubeAPIServer, loadBalancer string) string
}

InfrastructureProvider is an interface for infrastructure providers.

func NewInfrastructureProvider

func NewInfrastructureProvider(providerType api.InfrastructureProviderType) (InfrastructureProvider, error)

NewInfrastructureProvider returns a new InfrastructureProvider interface for the given provider type.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL