From c54842acd881decfb00728e9d1debfb9be6d1cfc Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 30 Oct 2026 11:11:52 +0100 Subject: [PATCH] fix: Keep the "none" version label on unversioned role-group resources --- CHANGELOG.md | 8 ++---- .../src/controller/build/container.rs | 3 +- .../src/controller/build/mod.rs | 28 +++++++++++++++++-- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f17fd9..ea9ac873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,11 +30,8 @@ All notable changes to this project will be documented in this file. variables set by the operator. In particular, `CONTAINERDEBUG_LOG_DIRECTORY` and the authentication-related environment variables can now be overridden, whereas previously the operator's values always took precedence ([#865]). -- BREAKING: Remove the `app.kubernetes.io/component` and `app.kubernetes.io/role-group` labels - from the resources they don't apply to (previously set to `none` or a placeholder value). - StatefulSets created by older operator versions cannot be updated in place: after the - operator upgrade, delete each broker, coordinator and router StatefulSet so that the operator - immediately recreates it with the new labels ([#865]). +- Remove the `app.kubernetes.io/component` and `app.kubernetes.io/role-group` labels from the + resources they don't apply to ([#865], [#892]). - Make operations infallible where dependent on static inputs ([#869], [#874]). - Internal operator refactoring: build each role group through per-role modules (brokers, coordinators, historicals, middle managers, routers) and a shared role group builder, with @@ -73,6 +70,7 @@ All notable changes to this project will be documented in this file. [#888]: https://github.com/stackabletech/druid-operator/pull/888 [#889]: https://github.com/stackabletech/druid-operator/pull/889 [#891]: https://github.com/stackabletech/druid-operator/pull/891 +[#892]: https://github.com/stackabletech/druid-operator/pull/892 ## [26.7.0] - 2026-07-21 diff --git a/rust/operator-binary/src/controller/build/container.rs b/rust/operator-binary/src/controller/build/container.rs index bd4de28b..ef3358e1 100644 --- a/rust/operator-binary/src/controller/build/container.rs +++ b/rust/operator-binary/src/controller/build/container.rs @@ -188,8 +188,7 @@ pub(crate) fn containers_and_volumes(inputs: &RoleGroupInputs) -> Result Labels { - label::recommended_labels_for_unversioned_role_group_resources( + label::recommended_labels_for_role_group_resources( &cluster.name, &PRODUCT_NAME, + &UNVERSIONED_PRODUCT_VERSION, &OPERATOR_NAME, &CONTROLLER_NAME, role_name, @@ -483,7 +499,7 @@ mod tests { use strum::IntoEnumIterator; use super::{ - KubernetesResources, Prepared, SecretKey, build, + KubernetesResources, Prepared, SecretKey, UNVERSIONED_PRODUCT_VERSION, build, container::{ DRUID_CONFIG_VOLUME_NAME, HDFS_CONFIG_VOLUME_NAME, LOG_CONFIG_VOLUME_NAME, LOG_VOLUME_NAME, RW_CONFIG_VOLUME_NAME, @@ -752,6 +768,12 @@ spec: .expect("the ConfigMap has data") } + #[test] + fn test_constants() { + // Test that dereferencing the constant does not panic. + let _ = *UNVERSIONED_PRODUCT_VERSION; + } + /// A pod's `volumes` are an ordered list: reordering them changes the pod template of every /// running StatefulSet and so restarts its pods. Pinned on the fixture that has every /// optional volume: the operator-managed volumes first, the Historical segment cache after