Documentation ¶
Index ¶
- func GetAWSBucketRegion(bucket string) (string, error)
- func GetAzureResticEnvVars(config map[string]string) (map[string]string, error)
- func GetGCPCredentials(config map[string]string) string
- func GetGCPResticEnvVars(config map[string]string) (map[string]string, error)
- func GetRepoIdentifier(location *velerov1api.BackupStorageLocation, name string) (string, error)
- func GetS3Credentials(config map[string]string) (*aws.Credentials, error)
- func GetS3ResticEnvVars(config map[string]string) (map[string]string, error)
- func IsBackendTypeValid(backendType BackendType) bool
- type BackendType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAWSBucketRegion ¶
GetAWSBucketRegion returns the AWS region that a bucket is in, or an error if the region cannot be determined.
func GetAzureResticEnvVars ¶
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 GetGCPCredentials ¶
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 ¶
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) (*aws.Credentials, error)
GetS3Credentials gets the S3 credential values according to the information of the provided config or the system's environment variables
func GetS3ResticEnvVars ¶
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.