Skip to content

Commit 77b8f1a

Browse files
committed
chore: Add S3 bucket region to config
1 parent 57b8797 commit 77b8f1a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

rust/operator-binary/src/crd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ pub const DS_DIRECTORY: &str = "druid.storage.storageDirectory";
9898
pub const DS_BUCKET: &str = "druid.storage.bucket";
9999
pub const DS_BASE_KEY: &str = "druid.storage.baseKey";
100100
pub const S3_ENDPOINT_URL: &str = "druid.s3.endpoint.url";
101+
pub const S3_REGION_NAME: &str = "aws.region";
101102
pub const S3_ACCESS_KEY: &str = "druid.s3.accessKey";
102103
pub const S3_SECRET_KEY: &str = "druid.s3.secretKey";
103104
pub const S3_PATH_STYLE_ACCESS: &str = "druid.s3.enablePathStyleAccess";
@@ -389,6 +390,7 @@ impl v1alpha1::DruidCluster {
389390
Ok(result)
390391
}
391392

393+
#[allow(clippy::type_complexity)]
392394
pub fn build_role_properties(
393395
&self,
394396
) -> HashMap<

rust/operator-binary/src/druid_controller.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ use crate::{
7676
DRUID_CONFIG_DIRECTORY, DS_BUCKET, EXTENSIONS_LOADLIST, HDFS_CONFIG_DIRECTORY, JVM_CONFIG,
7777
JVM_SECURITY_PROPERTIES_FILE, LOG_CONFIG_DIRECTORY, MAX_DRUID_LOG_FILES_SIZE,
7878
OPERATOR_NAME, RUNTIME_PROPS, RW_CONFIG_DIRECTORY, S3_ACCESS_KEY, S3_ENDPOINT_URL,
79-
S3_PATH_STYLE_ACCESS, S3_SECRET_KEY, STACKABLE_LOG_DIR, ZOOKEEPER_CONNECTION_STRING,
79+
S3_PATH_STYLE_ACCESS, S3_REGION_NAME, S3_SECRET_KEY, STACKABLE_LOG_DIR,
80+
ZOOKEEPER_CONNECTION_STRING,
8081
},
8182
discovery::{self, build_discovery_configmaps},
8283
extensions::get_extension_list,
@@ -734,6 +735,8 @@ fn build_rolegroup_config_map(
734735
};
735736

736737
if let Some(s3) = s3_conn {
738+
conf.insert(S3_REGION_NAME.to_string(), Some(s3.region.name.to_string()));
739+
737740
conf.insert(
738741
S3_ENDPOINT_URL.to_string(),
739742
Some(s3.endpoint().context(ConfigureS3Snafu)?.to_string()),

0 commit comments

Comments
 (0)