Skip to content

Commit 3f9122e

Browse files
committed
chore: Increase coordinator temporary credentials lifetime
1 parent 26526b3 commit 3f9122e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rust/crd/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ pub struct TrinoConfig {
440440
}
441441

442442
impl TrinoConfig {
443-
const DEFAULT_SECRET_LIFETIME: Duration = Duration::from_days_unchecked(1);
444443
fn default_config(
445444
cluster_name: &str,
446445
role: &TrinoRole,
@@ -454,6 +453,13 @@ impl TrinoConfig {
454453
TrinoRole::Coordinator => DEFAULT_COORDINATOR_GRACEFUL_SHUTDOWN_TIMEOUT,
455454
TrinoRole::Worker => DEFAULT_WORKER_GRACEFUL_SHUTDOWN_TIMEOUT,
456455
};
456+
let requested_secret_lifetime = match role {
457+
// TODO: Once Trino supports a HA setup for coordinators we should decrease this!
458+
// See https://github.com/stackabletech/trino-operator/issues/693
459+
// and https://github.com/stackabletech/decisions/issues/38 for details
460+
TrinoRole::Coordinator => Duration::from_days_unchecked(15),
461+
TrinoRole::Worker => Duration::from_days_unchecked(1),
462+
};
457463

458464
TrinoConfigFragment {
459465
logging: product_logging::spec::default_logging(),
@@ -478,7 +484,7 @@ impl TrinoConfig {
478484
query_max_memory: None,
479485
query_max_memory_per_node: None,
480486
graceful_shutdown_timeout: Some(graceful_shutdown_timeout),
481-
requested_secret_lifetime: Some(Self::DEFAULT_SECRET_LIFETIME),
487+
requested_secret_lifetime: Some(requested_secret_lifetime),
482488
}
483489
}
484490
}

0 commit comments

Comments
 (0)