Documentation
¶
Overview ¶
Package backups provides backup utilities
Index ¶
- func AssertBackupConditionInClusterStatus(ctx context.Context, crudClient client.Client, namespace, clusterName string)
- func ComposeAzBlobListAzuriteCmd(clusterName, path string) string
- func ComposeAzBlobListCmd(configuration AzureConfiguration, clusterName, path string) string
- func CountFilesOnAzureBlobStorage(configuration AzureConfiguration, clusterName, path string) (int, error)
- func CountFilesOnAzuriteBlobStorage(namespace, clusterName, path string) (int, error)
- func Create(ctx context.Context, crudClient client.Client, targetBackup apiv1.Backup) (*apiv1.Backup, error)
- func CreateCertificateSecretsOnAzurite(ctx context.Context, crudClient client.Client, ...) error
- func CreateClusterFromBackupUsingPITR(ctx context.Context, crudClient client.Client, scheme *runtime.Scheme, ...) (*apiv1.Cluster, error)
- func CreateClusterFromExternalClusterBackupWithPITROnAzure(ctx context.Context, crudClient client.Client, ...) (*apiv1.Cluster, error)
- func CreateClusterFromExternalClusterBackupWithPITROnAzurite(ctx context.Context, crudClient client.Client, ...) (*apiv1.Cluster, error)
- func CreateClusterFromExternalClusterBackupWithPITROnMinio(ctx context.Context, crudClient client.Client, ...) (*apiv1.Cluster, error)
- func CreateOnDemand(ctx context.Context, crudClient client.Client, ...) (*apiv1.Backup, error)
- func CreateOnDemandBackupViaKubectlPlugin(namespace, clusterName, backupName string, target apiv1.BackupTarget, ...) error
- func CreateSASTokenCredentials(ctx context.Context, crudClient client.Client, namespace, id, key string) error
- func CreateStorageCredentialsOnAzurite(ctx context.Context, crudClient client.Client, namespace string) error
- func Execute(ctx context.Context, crudClient client.Client, scheme *runtime.Scheme, ...) *apiv1.Backup
- func GetConditionsInClusterStatus(ctx context.Context, crudClient client.Client, namespace, clusterName string, ...) (*metav1.Condition, error)
- func GetVolumeSnapshot(ctx context.Context, crudClient client.Client, namespace, name string) (*volumesnapshotv1.VolumeSnapshot, error)
- func InstallAzCli(ctx context.Context, crudClient client.Client, namespace string) error
- func InstallAzurite(ctx context.Context, crudClient client.Client, namespace string) error
- func List(ctx context.Context, crudClient client.Client, namespace string) (*apiv1.BackupList, error)
- type AzureConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBackupConditionInClusterStatus ¶
func AssertBackupConditionInClusterStatus( ctx context.Context, crudClient client.Client, namespace, clusterName string, )
AssertBackupConditionInClusterStatus check that the backup condition in the Cluster's Status eventually returns true
func ComposeAzBlobListAzuriteCmd ¶
ComposeAzBlobListAzuriteCmd builds the Azure storage blob list command for Azurite
func ComposeAzBlobListCmd ¶
func ComposeAzBlobListCmd( configuration AzureConfiguration, clusterName, path string, ) string
ComposeAzBlobListCmd builds the Azure storage blob list command
func CountFilesOnAzureBlobStorage ¶
func CountFilesOnAzureBlobStorage( configuration AzureConfiguration, clusterName, path string, ) (int, error)
CountFilesOnAzureBlobStorage counts files on Azure Blob storage
func CountFilesOnAzuriteBlobStorage ¶
CountFilesOnAzuriteBlobStorage counts files on Azure Blob storage. using Azurite
func Create ¶
func Create( ctx context.Context, crudClient client.Client, targetBackup apiv1.Backup, ) (*apiv1.Backup, error)
Create creates a Backup resource for a given cluster name
func CreateCertificateSecretsOnAzurite ¶
func CreateCertificateSecretsOnAzurite( ctx context.Context, crudClient client.Client, namespace, clusterName, azuriteCaSecName, azuriteTLSSecName string, ) error
CreateCertificateSecretsOnAzurite will create secrets for Azurite deployment
func CreateClusterFromBackupUsingPITR ¶
func CreateClusterFromBackupUsingPITR( ctx context.Context, crudClient client.Client, scheme *runtime.Scheme, namespace, clusterName, backupFilePath, targetTime string, ) (*apiv1.Cluster, error)
CreateClusterFromBackupUsingPITR creates a cluster from backup, using the PITR
func CreateClusterFromExternalClusterBackupWithPITROnAzure ¶
func CreateClusterFromExternalClusterBackupWithPITROnAzure( ctx context.Context, crudClient client.Client, namespace, externalClusterName, sourceClusterName, targetTime, storageCredentialsSecretName, azStorageAccount, azBlobContainer string, ) (*apiv1.Cluster, error)
CreateClusterFromExternalClusterBackupWithPITROnAzure creates a cluster on Azure, starting from an external cluster backup with PITR
func CreateClusterFromExternalClusterBackupWithPITROnAzurite ¶
func CreateClusterFromExternalClusterBackupWithPITROnAzurite( ctx context.Context, crudClient client.Client, namespace, externalClusterName, sourceClusterName, targetTime string, ) (*apiv1.Cluster, error)
CreateClusterFromExternalClusterBackupWithPITROnAzurite creates a cluster with Azurite, starting from an external cluster backup with PITR
func CreateClusterFromExternalClusterBackupWithPITROnMinio ¶
func CreateClusterFromExternalClusterBackupWithPITROnMinio( ctx context.Context, crudClient client.Client, namespace, externalClusterName, sourceClusterName, targetTime string, ) (*apiv1.Cluster, error)
CreateClusterFromExternalClusterBackupWithPITROnMinio creates a cluster on Minio, starting from an external cluster backup with PITR
func CreateOnDemand ¶
func CreateOnDemand( ctx context.Context, crudClient client.Client, namespace, clusterName, backupName string, target apiv1.BackupTarget, method apiv1.BackupMethod, ) (*apiv1.Backup, error)
CreateOnDemand creates a Backup resource for a given cluster name Deprecated: Use Create. TODO: eradicate
func CreateOnDemandBackupViaKubectlPlugin ¶
func CreateOnDemandBackupViaKubectlPlugin( namespace, clusterName, backupName string, target apiv1.BackupTarget, method apiv1.BackupMethod, ) error
CreateOnDemandBackupViaKubectlPlugin uses the kubectl plugin to create a backup
func CreateSASTokenCredentials ¶
func CreateSASTokenCredentials( ctx context.Context, crudClient client.Client, namespace, id, key string, ) error
CreateSASTokenCredentials generates Secrets for the Azure Blob Storage
func CreateStorageCredentialsOnAzurite ¶
func CreateStorageCredentialsOnAzurite( ctx context.Context, crudClient client.Client, namespace string, ) error
CreateStorageCredentialsOnAzurite will create credentials for Azurite
func Execute ¶
func Execute( ctx context.Context, crudClient client.Client, scheme *runtime.Scheme, namespace, backupFile string, onlyTargetStandbys bool, timeoutSeconds int, ) *apiv1.Backup
Execute performs a backup and checks the backup status
func GetConditionsInClusterStatus ¶
func GetConditionsInClusterStatus( ctx context.Context, crudClient client.Client, namespace, clusterName string, conditionType apiv1.ClusterConditionType, ) (*metav1.Condition, error)
GetConditionsInClusterStatus get conditions values as given type from cluster object status
func GetVolumeSnapshot ¶
func GetVolumeSnapshot( ctx context.Context, crudClient client.Client, namespace, name string, ) (*volumesnapshotv1.VolumeSnapshot, error)
GetVolumeSnapshot gets a VolumeSnapshot given name and namespace
func InstallAzCli ¶
InstallAzCli will install Az cli
func InstallAzurite ¶
InstallAzurite will set up Azurite in defined namespace and creates service
Types ¶
type AzureConfiguration ¶
AzureConfiguration contains the variables needed to run the azure test environment correctly
func NewAzureConfigurationFromEnv ¶
func NewAzureConfigurationFromEnv() AzureConfiguration
NewAzureConfigurationFromEnv creates a new AzureConfiguration from the environment variables