INNER CODE UNIT · Go

getBackupStorage

mariadb-operator/mariadb-operator · cmd/backup/main.go:224

func getBackupStorage(processor backup.BackupProcessor) (backup.BackupStorage, error) {
	if s3 {
		logger.Info("configuring S3 backup storage")
		opts := []mdbminio.MinioOpt{
			mdbminio.WithTLS(s3TLS),
			mdbminio.WithCACertPath(s3CACertPath),
			mdbminio.WithRegion(s3Region),
			mdbminio.WithPrefix(s3Prefix),
		}
		if ssecKey := os.Getenv(builder.S3SSECCustomerKey); ssecKey != "" {
			logger.Info("configuring S3 SSE-C encryption")
			opts = append(opts, mdbminio.WithSSECCustomerKey(ssecKey))
		}
		return backup.NewBlobBackupStorageWithS3(
			path,
			s3Bucket,
			s3Endpoint,
			processor,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…