Skip to content

Commit 1ff4ac2

Browse files
committed
Expose ZOOKEEPER_PORT in discovery CM (#675)
# Description *Please add a description here. This will become the commit message of the merge request later.*
1 parent 5377651 commit 1ff4ac2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Generate OLM bundle for Release 23.4.0 ([#672]).
10+
- Expose `ZOOKEEPER_PORT` in discovery CM ([#675]).
1011

1112
### Changed
1213

@@ -17,6 +18,7 @@ All notable changes to this project will be documented in this file.
1718
[#672]: https://github.com/stackabletech/zookeeper-operator/pull/672
1819
[#673]: https://github.com/stackabletech/zookeeper-operator/pull/673
1920
[#674]: https://github.com/stackabletech/zookeeper-operator/pull/674
21+
[#675]: https://github.com/stackabletech/zookeeper-operator/pull/675
2022

2123
## [23.4.0] - 2023-04-17
2224

rust/operator-binary/src/discovery.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub async fn build_discovery_configmaps(
6363
let mut discovery_configmaps = vec![build_discovery_configmap(
6464
zk,
6565
owner,
66+
zookeeper_security,
6667
name.as_str(),
6768
&namespace,
6869
controller_name,
@@ -76,6 +77,7 @@ pub async fn build_discovery_configmaps(
7677
discovery_configmaps.push(build_discovery_configmap(
7778
zk,
7879
owner,
80+
zookeeper_security,
7981
&format!("{}-nodeport", name),
8082
&namespace,
8183
controller_name,
@@ -95,6 +97,7 @@ pub async fn build_discovery_configmaps(
9597
fn build_discovery_configmap(
9698
zk: &ZookeeperCluster,
9799
owner: &impl Resource<DynamicType = ()>,
100+
zookeeper_security: &ZookeeperSecurity,
98101
name: &str,
99102
namespace: &str,
100103
controller_name: &str,
@@ -138,6 +141,10 @@ fn build_discovery_configmap(
138141
.add_data("ZOOKEEPER", conn_str)
139142
// Some clients don't support ZooKeeper's merged `hosts/chroot` format, so export them separately for these clients
140143
.add_data("ZOOKEEPER_HOSTS", hosts)
144+
.add_data(
145+
"ZOOKEEPER_PORT",
146+
zookeeper_security.client_port().to_string(),
147+
)
141148
.add_data("ZOOKEEPER_CHROOT", chroot.unwrap_or("/"))
142149
.build()
143150
.context(BuildConfigMapSnafu)

0 commit comments

Comments
 (0)