Skip to content

Commit 742dcd8

Browse files
committed
feat(stackable-operator/s3connection: Add region field defaulting to us-east-1
1 parent 3dc437e commit 742dcd8

File tree

1 file changed

+10
-0
lines changed
  • crates/stackable-operator/src/commons/s3

1 file changed

+10
-0
lines changed

crates/stackable-operator/src/commons/s3/crd.rs

+10
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ pub struct S3ConnectionSpec {
5656
#[serde(default, skip_serializing_if = "Option::is_none")]
5757
pub port: Option<u16>,
5858

59+
/// Region to connect to when using AWS S3.
60+
///
61+
/// This defaults to us-east-1, and can be ignored if not using AWS S3.
62+
#[serde(default = "s3_region_default")]
63+
region: String,
64+
5965
/// Which access style to use.
6066
/// Defaults to virtual hosted-style as most of the data products out there.
6167
/// Have a look at the [AWS documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html).
@@ -85,3 +91,7 @@ pub enum S3AccessStyle {
8591
#[default]
8692
VirtualHosted,
8793
}
94+
95+
fn s3_region_default() -> String {
96+
"us-east-1".to_owned()
97+
}

0 commit comments

Comments
 (0)