Skip to content

Commit

Permalink
add s3 min part size support
Browse files Browse the repository at this point in the history
Signed-off-by: Renan Rangel <[email protected]>
  • Loading branch information
rvrangel committed Dec 13, 2024
1 parent b8d5105 commit 59e114a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/apis/planetscale/v2/vitessbackupstorage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ type S3BackupLocation struct {
// `~/.aws/credentials` file.
// Default: Use the default credentials of the Node.
AuthSecret *SecretSource `json:"authSecret,omitempty"`
// MinPartSize is optional and is only needed if we want to set a minimum part size
// to be used by the S3 uploader, mainly used to avoid too many small requests to S3
// when there are too many small shards.
// Default: 5242880 (5MiB)
MinPartSize int64 `json:"minPartSize,omitempty"`
}

// AzblobBackupLocation specifies a backup location in Azure Blob Storage.
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/vitessbackup/storage_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func s3BackupFlags(s3 *planetscalev2.S3BackupLocation, clusterName string) vites
"s3_backup_storage_bucket": s3.Bucket,
"s3_backup_storage_root": rootKeyPrefix(s3.KeyPrefix, clusterName),
"s3_backup_force_path_style": s3.ForcePathStyle,
"s3_backup_aws_min_partsize": s3.MinPartSize,
}
if len(s3.Endpoint) > 0 {
flags["s3_backup_aws_endpoint"] = s3.Endpoint
Expand Down

0 comments on commit 59e114a

Please sign in to comment.