diff --git a/CHANGELOG.md b/CHANGELOG.md index fddc91ee..5280d82a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- Add `ZOOCFGDIR` env var to `/stackable/rwconfig` to improve shell script usage like `zkCleanup.sh` ([#988]). + +[#988]: https://github.com/stackabletech/zookeeper-operator/pull/988 + ## [25.11.0] - 2025-11-07 ## [25.11.0-rc1] - 2025-11-06 diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 594dbec0..e114f65c 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -416,16 +416,24 @@ impl Configuration for v1alpha1::ZookeeperConfigFragment { resource: &Self::Configurable, _role_name: &str, ) -> Result>, product_config_utils::Error> { - Ok([( - v1alpha1::ZookeeperConfig::MYID_OFFSET.to_string(), - self.myid_offset - .or(v1alpha1::ZookeeperConfig::default_server_config( - &resource.name_any(), - &ZookeeperRole::Server, - ) - .myid_offset) - .map(|myid_offset| myid_offset.to_string()), - )] + Ok([ + ( + v1alpha1::ZookeeperConfig::MYID_OFFSET.to_string(), + self.myid_offset + .or(v1alpha1::ZookeeperConfig::default_server_config( + &resource.name_any(), + &ZookeeperRole::Server, + ) + .myid_offset) + .map(|myid_offset| myid_offset.to_string()), + ), + // This is used by zkEnv.sh and for the shell scripts in bin/ + // If unset it tries to find the conf directory automatically and that fails + ( + "ZOOCFGDIR".to_string(), + Some(STACKABLE_RW_CONFIG_DIR.to_string()), + ), + ] .into()) }