Skip to content

Commit 76bc5d6

Browse files
authored
Set ZOOCFGDIR env var to /stackable/rwconfig via product config (#988)
* Set ZOOCFGDIR env var to /stackable/rwconfig via product config * Adapt changelog
1 parent 9b33399 commit 76bc5d6

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- Add `ZOOCFGDIR` env var to `/stackable/rwconfig` to improve shell script usage like `zkCleanup.sh` ([#988]).
10+
11+
[#988]: https://github.com/stackabletech/zookeeper-operator/pull/988
12+
713
## [25.11.0] - 2025-11-07
814

915
## [25.11.0-rc1] - 2025-11-06

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -416,16 +416,24 @@ impl Configuration for v1alpha1::ZookeeperConfigFragment {
416416
resource: &Self::Configurable,
417417
_role_name: &str,
418418
) -> Result<BTreeMap<String, Option<String>>, product_config_utils::Error> {
419-
Ok([(
420-
v1alpha1::ZookeeperConfig::MYID_OFFSET.to_string(),
421-
self.myid_offset
422-
.or(v1alpha1::ZookeeperConfig::default_server_config(
423-
&resource.name_any(),
424-
&ZookeeperRole::Server,
425-
)
426-
.myid_offset)
427-
.map(|myid_offset| myid_offset.to_string()),
428-
)]
419+
Ok([
420+
(
421+
v1alpha1::ZookeeperConfig::MYID_OFFSET.to_string(),
422+
self.myid_offset
423+
.or(v1alpha1::ZookeeperConfig::default_server_config(
424+
&resource.name_any(),
425+
&ZookeeperRole::Server,
426+
)
427+
.myid_offset)
428+
.map(|myid_offset| myid_offset.to_string()),
429+
),
430+
// This is used by zkEnv.sh and for the shell scripts in bin/
431+
// If unset it tries to find the conf directory automatically and that fails
432+
(
433+
"ZOOCFGDIR".to_string(),
434+
Some(STACKABLE_RW_CONFIG_DIR.to_string()),
435+
),
436+
]
429437
.into())
430438
}
431439

0 commit comments

Comments
 (0)