Skip to content

Commit c8605f2

Browse files
committed
fix: add internal tls helper
1 parent 7da182f commit c8605f2

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

rust/operator-binary/src/controller/build/properties/config_properties.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ pub fn build(
132132

133133
// TLS gating — mirrors the existing compute_files logic, including the
134134
// authentication-requires-TLS check.
135-
let server_tls_enabled = cluster.cluster_config.tls.server.is_some();
136-
let internal_tls_enabled = cluster.cluster_config.tls.internal.is_some();
135+
let server_tls_enabled = cluster.server_tls_enabled();
136+
let internal_tls_enabled = cluster.internal_tls_enabled();
137137
if cluster.cluster_config.authentication_enabled() && !server_tls_enabled {
138138
return Err(Error::AuthenticationRequiresTls);
139139
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ impl ValidatedCluster {
172172
self.cluster_config.tls.server.is_some()
173173
}
174174

175+
/// Whether internal (inter-node) TLS is enabled.
176+
pub fn internal_tls_enabled(&self) -> bool {
177+
self.cluster_config.tls.internal.is_some()
178+
}
179+
175180
/// The user-provided server TLS SecretClass, if any.
176181
///
177182
/// Mirrors [`v1alpha1::TrinoCluster::get_server_tls`] but reads from the validated config so

0 commit comments

Comments
 (0)