config

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSBucketRegion

func GetAWSBucketRegion(bucket string) (string, error)

GetAWSBucketRegion returns the AWS region that a bucket is in, or an error if the region cannot be determined.

func GetAzureCredentials

func GetAzureCredentials(config map[string]string) (string, string, error)

func GetAzureResticEnvVars

func GetAzureResticEnvVars(config map[string]string) (map[string]string, error)

GetAzureResticEnvVars gets the environment variables that restic relies on (AZURE_ACCOUNT_NAME and AZURE_ACCOUNT_KEY) based on info in the provided object storage location config map.

func GetAzureStorageDomain

func GetAzureStorageDomain(config map[string]string) (string, error)

GetAzureStorageDomain gets the Azure storage domain required by a Azure blob connection, if the provided credential file doesn't have the value, get it from system's environment variables

func GetGCPCredentials

func GetGCPCredentials(config map[string]string) string

GetGCPCredentials gets the credential file required by a GCP bucket connection, if the provided config doean't have the value, get it from system's environment variables

func GetGCPResticEnvVars

func GetGCPResticEnvVars(config map[string]string) (map[string]string, error)

GetGCPResticEnvVars gets the environment variables that restic relies on based on info in the provided object storage location config map.

func GetRepoIdentifier

func GetRepoIdentifier(location *velerov1api.BackupStorageLocation, name string) (string, error)

GetRepoIdentifier returns the string to be used as the value of the --repo flag in restic commands for the given repository.

func GetS3Credentials

func GetS3Credentials(config map[string]string) (*credentials.Value, error)

GetS3Credentials gets the S3 credential values according to the information of the provided config or the system's environment variables

func GetS3ResticEnvVars

func GetS3ResticEnvVars(config map[string]string) (map[string]string, error)

GetS3ResticEnvVars gets the environment variables that restic relies on (AWS_PROFILE) based on info in the provided object storage location config map.

func IsBackendTypeValid

func IsBackendTypeValid(backendType BackendType) bool

Types

type BackendType

type BackendType string
const (
	AWSBackend   BackendType = "velero.io/aws"
	AzureBackend BackendType = "velero.io/azure"
	GCPBackend   BackendType = "velero.io/gcp"
	FSBackend    BackendType = "velero.io/fs"

	// CredentialsFileKey is the key within a BSL config that is checked to see if
	// the BSL is using its own credentials, rather than those in the environment
	CredentialsFileKey = "credentialsFile"
)

func GetBackendType

func GetBackendType(provider string, config map[string]string) BackendType

GetBackendType returns a backend type that is known by Velero. If the provider doesn't indicate a known backend type, but the endpoint is specified, Velero regards it as a S3 compatible object store and return AWSBackend as the type.

Jump to

Keyboard shortcuts

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