Skip to content

Commit 3385544

Browse files
committed
use boolean for https instead of hbase cluster
1 parent b562ea9 commit 3385544

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,10 @@ impl HbaseRole {
725725
pub fn ports(&self, hbase: &v1alpha1::HbaseCluster) -> Vec<(String, u16)> {
726726
vec![
727727
(self.data_port_name(hbase), self.data_port()),
728-
(Self::ui_port_name(hbase).to_string(), self.ui_port()),
728+
(
729+
Self::ui_port_name(hbase.has_https_enabled()).to_string(),
730+
self.ui_port(),
731+
),
729732
]
730733
}
731734

@@ -759,8 +762,8 @@ impl HbaseRole {
759762
}
760763

761764
/// Name of the port used by the Web UI, which depends on HTTPS usage
762-
pub fn ui_port_name(hbase: &v1alpha1::HbaseCluster) -> &str {
763-
if hbase.has_https_enabled() {
765+
pub fn ui_port_name(has_https_enabled: bool) -> &'static str {
766+
if has_https_enabled {
764767
HBASE_UI_PORT_NAME_HTTPS
765768
} else {
766769
HBASE_UI_PORT_NAME_HTTP

rust/operator-binary/src/hbase_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ fn build_rolegroup_statefulset(
915915
role = role_name,
916916
port = hbase_role.data_port(),
917917
port_name = hbase_role.data_port_name(hbase),
918-
ui_port_name = HbaseRole::ui_port_name(hbase),
918+
ui_port_name = HbaseRole::ui_port_name(hbase.has_https_enabled()),
919919
}])
920920
.add_env_vars(merged_env)
921921
// Needed for the `containerdebug` process to log it's tracing information to.

0 commit comments

Comments
 (0)