From 3fd6e3c58b05402b6db3fde93d1f8c0df1e13f26 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Tue, 8 Apr 2025 14:14:11 +0200 Subject: [PATCH 1/5] inject vector aggregator address as env into config & add watch for referenced cms --- CHANGELOG.md | 7 + Cargo.lock | 8 +- Cargo.nix | 14 +- Cargo.toml | 2 +- crate-hashes.json | 6 +- rust/operator-binary/src/kafka_controller.rs | 76 ++++++----- rust/operator-binary/src/main.rs | 130 ++++++++++++------- rust/operator-binary/src/product_logging.rs | 54 +------- 8 files changed, 143 insertions(+), 154 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b0453a..8f37ea08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,15 @@ All notable changes to this project will be documented in this file. - BREAKING: The file log directory was set by `KAFKA_OPERATOR_LOG_DIRECTORY`, and is now set by `ROLLING_LOGS` (or via `--rolling-logs `). - Replace stackable-operator `print_startup_string` with `tracing::info!` with fields. +- BREAKING: Inject the vector aggregator address into the vector config using the env var `VECTOR_AGGREGATOR_ADDRESS` instead + of having the operator write it to the vector config ([#XXX]). + +### Fixed + +- Fix a bug where changes to ConfigMaps that are referenced in the KafkaCluster spec didn't trigger a reconciliation ([#XXX]). [#840]: https://github.com/stackabletech/kafka-operator/pull/840 +[#XXX]: https://github.com/stackabletech/kafka-operator/pull/XXX ## [25.3.0] - 2025-03-21 diff --git a/Cargo.lock b/Cargo.lock index 4f9cdd7b..118c3381 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2639,8 +2639,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.89.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.89.1#cd73728af410c52972b9a9a3ba1302bcdb574d04" +version = "0.90.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.90.0#ea063b4595caa20c82d37c595487c76476c9ab10" dependencies = [ "chrono", "clap", @@ -2675,7 +2675,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.89.1#cd73728af410c52972b9a9a3ba1302bcdb574d04" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.90.0#ea063b4595caa20c82d37c595487c76476c9ab10" dependencies = [ "darling", "proc-macro2", @@ -2686,7 +2686,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.89.1#cd73728af410c52972b9a9a3ba1302bcdb574d04" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.90.0#ea063b4595caa20c82d37c595487c76476c9ab10" dependencies = [ "kube", "semver", diff --git a/Cargo.nix b/Cargo.nix index d534ab43..af38ad5c 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -8541,13 +8541,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.89.1"; + version = "0.90.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "cd73728af410c52972b9a9a3ba1302bcdb574d04"; - sha256 = "1hrxrybc6197ibx0m2wfxlg5pdg4hanf6xvslzrhsp77a04pb0y9"; + rev = "ea063b4595caa20c82d37c595487c76476c9ab10"; + sha256 = "0fclvpxhchykqd7bl8hscr4v06mbs2v5vjp0xv27nvqr94j63xs2"; }; libName = "stackable_operator"; authors = [ @@ -8692,8 +8692,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "cd73728af410c52972b9a9a3ba1302bcdb574d04"; - sha256 = "1hrxrybc6197ibx0m2wfxlg5pdg4hanf6xvslzrhsp77a04pb0y9"; + rev = "ea063b4595caa20c82d37c595487c76476c9ab10"; + sha256 = "0fclvpxhchykqd7bl8hscr4v06mbs2v5vjp0xv27nvqr94j63xs2"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -8727,8 +8727,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "cd73728af410c52972b9a9a3ba1302bcdb574d04"; - sha256 = "1hrxrybc6197ibx0m2wfxlg5pdg4hanf6xvslzrhsp77a04pb0y9"; + rev = "ea063b4595caa20c82d37c595487c76476c9ab10"; + sha256 = "0fclvpxhchykqd7bl8hscr4v06mbs2v5vjp0xv27nvqr94j63xs2"; }; libName = "stackable_shared"; authors = [ diff --git a/Cargo.toml b/Cargo.toml index 7204bdb3..f02166e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/kafka-operator" [workspace.dependencies] product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" } -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.89.1" } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.90.0" } stackable-telemetry = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-telemetry-0.4.0" } stackable-versioned = { git = "https://github.com/stackabletech/operator-rs.git", features = ["k8s"], tag = "stackable-versioned-0.7.1" } diff --git a/crate-hashes.json b/crate-hashes.json index 0460dbd5..c8a9703a 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,7 +1,7 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.89.1#stackable-operator-derive@0.3.1": "1hrxrybc6197ibx0m2wfxlg5pdg4hanf6xvslzrhsp77a04pb0y9", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.89.1#stackable-operator@0.89.1": "1hrxrybc6197ibx0m2wfxlg5pdg4hanf6xvslzrhsp77a04pb0y9", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.89.1#stackable-shared@0.0.1": "1hrxrybc6197ibx0m2wfxlg5pdg4hanf6xvslzrhsp77a04pb0y9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.90.0#stackable-operator-derive@0.3.1": "0fclvpxhchykqd7bl8hscr4v06mbs2v5vjp0xv27nvqr94j63xs2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.90.0#stackable-operator@0.90.0": "0fclvpxhchykqd7bl8hscr4v06mbs2v5vjp0xv27nvqr94j63xs2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.90.0#stackable-shared@0.0.1": "0fclvpxhchykqd7bl8hscr4v06mbs2v5vjp0xv27nvqr94j63xs2", "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-telemetry-0.4.0#stackable-telemetry@0.4.0": "0hcm64fb2ngyalq8rci5lrr881prg023pq9cd1sfr79iynbr6a26", "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.7.1#k8s-version@0.1.2": "16klfwx3kz3ys7afwjicfj8msws9a718izx09jspwwpff3rl6wsi", "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.7.1#stackable-versioned-macros@0.7.1": "16klfwx3kz3ys7afwjicfj8msws9a718izx09jspwwpff3rl6wsi", diff --git a/rust/operator-binary/src/kafka_controller.rs b/rust/operator-binary/src/kafka_controller.rs index bb6fa51d..f1a73301 100644 --- a/rust/operator-binary/src/kafka_controller.rs +++ b/rust/operator-binary/src/kafka_controller.rs @@ -92,10 +92,7 @@ use crate::{ graceful_shutdown::{add_graceful_shutdown_config, graceful_shutdown_config_properties}, pdb::add_pdbs, }, - product_logging::{ - LOG4J_CONFIG_FILE, MAX_KAFKA_LOG_FILES_SIZE, extend_role_group_config_map, - resolve_vector_aggregator_address, - }, + product_logging::{LOG4J_CONFIG_FILE, MAX_KAFKA_LOG_FILES_SIZE, extend_role_group_config_map}, utils::build_recommended_labels, }; @@ -253,10 +250,8 @@ pub enum Error { #[snafu(display("failed to resolve and merge config for role and role group"))] FailedToResolveConfig { source: crate::crd::Error }, - #[snafu(display("failed to resolve the Vector aggregator address"))] - ResolveVectorAggregatorAddress { - source: crate::product_logging::Error, - }, + #[snafu(display("vector agent is enabled but vector aggregator ConfigMap is missing"))] + VectorAggregatorConfigMapMissing, #[snafu(display("failed to add the logging configuration to the ConfigMap [{cm_name}]"))] InvalidLoggingConfig { @@ -396,7 +391,7 @@ impl ReconcilerError for Error { Error::FailedToInitializeSecurityContext { .. } => None, Error::CreateClusterResources { .. } => None, Error::FailedToResolveConfig { .. } => None, - Error::ResolveVectorAggregatorAddress { .. } => None, + Error::VectorAggregatorConfigMapMissing { .. } => None, Error::InvalidLoggingConfig { .. } => None, Error::ApplyServiceAccount { .. } => None, Error::ApplyRoleBinding { .. } => None, @@ -508,10 +503,6 @@ pub async fn reconcile_kafka( None }; - let vector_aggregator_address = resolve_vector_aggregator_address(kafka, client) - .await - .context(ResolveVectorAggregatorAddressSnafu)?; - let mut ss_cond_builder = StatefulSetConditionBuilder::default(); let (rbac_sa, rbac_rolebinding) = build_rbac_resources( @@ -550,7 +541,6 @@ pub async fn reconcile_kafka( &rolegroup_ref, rolegroup_config, &merged_config, - vector_aggregator_address.as_deref(), )?; let rg_statefulset = build_broker_rolegroup_statefulset( kafka, @@ -688,7 +678,6 @@ fn build_broker_rolegroup_config_map( rolegroup: &RoleGroupRef, broker_config: &HashMap>, merged_config: &KafkaConfig, - vector_aggregator_address: Option<&str>, ) -> Result { let mut server_cfg = broker_config .get(&PropertyNameKind::File(SERVER_PROPERTIES_FILE.to_string())) @@ -751,15 +740,11 @@ fn build_broker_rolegroup_config_map( tracing::debug!(?server_cfg, "Applied server config"); tracing::debug!(?jvm_sec_props, "Applied JVM config"); - extend_role_group_config_map( - rolegroup, - vector_aggregator_address, - &merged_config.logging, - &mut cm_builder, - ) - .context(InvalidLoggingConfigSnafu { - cm_name: rolegroup.object_name(), - })?; + extend_role_group_config_map(rolegroup, &merged_config.logging, &mut cm_builder).context( + InvalidLoggingConfigSnafu { + cm_name: rolegroup.object_name(), + }, + )?; cm_builder .build() @@ -1114,21 +1099,34 @@ fn build_broker_rolegroup_statefulset( // Add vector container after kafka container to keep the defaulting into kafka container if merged_config.logging.enable_vector_agent { - pod_builder.add_container( - product_logging::framework::vector_container( - resolved_product_image, - "config", - "log", - merged_config.logging.containers.get(&Container::Vector), - ResourceRequirementsBuilder::new() - .with_cpu_request("250m") - .with_cpu_limit("500m") - .with_memory_request("128Mi") - .with_memory_limit("128Mi") - .build(), - ) - .context(ConfigureLoggingSnafu)?, - ); + match kafka + .spec + .cluster_config + .vector_aggregator_config_map_name + .to_owned() + { + Some(vector_aggregator_config_map_name) => { + pod_builder.add_container( + product_logging::framework::vector_container( + resolved_product_image, + "config", + "log", + merged_config.logging.containers.get(&Container::Vector), + ResourceRequirementsBuilder::new() + .with_cpu_request("250m") + .with_cpu_limit("500m") + .with_memory_request("128Mi") + .with_memory_limit("128Mi") + .build(), + &vector_aggregator_config_map_name, + ) + .context(ConfigureLoggingSnafu)?, + ); + } + None => { + VectorAggregatorConfigMapMissingSnafu.fail()?; + } + } } add_graceful_shutdown_config(merged_config, &mut pod_builder).context(GracefulShutdownSnafu)?; diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index a16a8e6e..cb066dc9 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -14,10 +14,12 @@ use stackable_operator::{ rbac::v1::RoleBinding, }, kube::{ + ResourceExt, core::DeserializeGuard, runtime::{ Controller, events::{Recorder, Reporter}, + reflector::ObjectRef, watcher, }, }, @@ -156,55 +158,87 @@ pub async fn create_controller( instance: None, })); - Controller::new( + let kafka_controller = Controller::new( namespace.get_api::>(&client), watcher::Config::default(), - ) - .owns( - namespace.get_api::(&client), - watcher::Config::default(), - ) - .owns( - namespace.get_api::(&client), - watcher::Config::default(), - ) - .owns( - namespace.get_api::(&client), - watcher::Config::default(), - ) - .owns( - namespace.get_api::(&client), - watcher::Config::default(), - ) - .owns( - namespace.get_api::(&client), - watcher::Config::default(), - ) - .owns( - namespace.get_api::(&client), - watcher::Config::default(), - ) - .shutdown_on_signal() - .run( - kafka_controller::reconcile_kafka, - kafka_controller::error_policy, - Arc::new(kafka_controller::Ctx { - client: client.clone(), - product_config, - }), - ) - // We can let the reporting happen in the background - .for_each_concurrent( - 16, // concurrency limit - move |result| { - // The event_recorder needs to be shared across all invocations, so that - // events are correctly aggregated - let event_recorder = event_recorder.clone(); - async move { - report_controller_reconciled(&event_recorder, KAFKA_FULL_CONTROLLER_NAME, &result) + ); + let kafka_store_1 = kafka_controller.store(); + kafka_controller + .owns( + namespace.get_api::(&client), + watcher::Config::default(), + ) + .owns( + namespace.get_api::(&client), + watcher::Config::default(), + ) + .owns( + namespace.get_api::(&client), + watcher::Config::default(), + ) + .owns( + namespace.get_api::(&client), + watcher::Config::default(), + ) + .owns( + namespace.get_api::(&client), + watcher::Config::default(), + ) + .owns( + namespace.get_api::(&client), + watcher::Config::default(), + ) + .shutdown_on_signal() + .watches( + namespace.get_api::>(&client), + watcher::Config::default(), + move |config_map| { + kafka_store_1 + .state() + .into_iter() + .filter(move |kafka| references_config_map(kafka, &config_map)) + .map(|kafka| ObjectRef::from_obj(&*kafka)) + }, + ) + .run( + kafka_controller::reconcile_kafka, + kafka_controller::error_policy, + Arc::new(kafka_controller::Ctx { + client: client.clone(), + product_config, + }), + ) + // We can let the reporting happen in the background + .for_each_concurrent( + 16, // concurrency limit + move |result| { + // The event_recorder needs to be shared across all invocations, so that + // events are correctly aggregated + let event_recorder = event_recorder.clone(); + async move { + report_controller_reconciled( + &event_recorder, + KAFKA_FULL_CONTROLLER_NAME, + &result, + ) .await; - } - }, - ) - .await; + } + }, + ) + .await; +} + +fn references_config_map( + kafka: &DeserializeGuard, + config_map: &DeserializeGuard, +) -> bool { + let Ok(kafka) = &kafka.0 else { + return false; + }; + + kafka.spec.cluster_config.zookeeper_config_map_name == config_map.name_any() + || match kafka.spec.cluster_config.authorization.opa.to_owned() { + Some(opa_config) => opa_config.config_map_name == config_map.name_any(), + None => false, + } } diff --git a/rust/operator-binary/src/product_logging.rs b/rust/operator-binary/src/product_logging.rs index fc58e460..2ba77898 100644 --- a/rust/operator-binary/src/product_logging.rs +++ b/rust/operator-binary/src/product_logging.rs @@ -1,9 +1,6 @@ -use snafu::{OptionExt, ResultExt, Snafu}; +use snafu::Snafu; use stackable_operator::{ builder::configmap::ConfigMapBuilder, - client::Client, - k8s_openapi::api::core::v1::ConfigMap, - kube::ResourceExt, memory::{BinaryMultiple, MemoryQuantity}, product_logging::{ self, @@ -33,9 +30,6 @@ pub enum Error { #[snafu(display("crd validation failure"))] CrdValidationFailure { source: crate::crd::Error }, - - #[snafu(display("vectorAggregatorConfigMapName must be set"))] - MissingVectorAggregatorAddress, } type Result = std::result::Result; @@ -48,51 +42,11 @@ pub const MAX_KAFKA_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity { unit: BinaryMultiple::Mebi, }; -const VECTOR_AGGREGATOR_CM_ENTRY: &str = "ADDRESS"; const CONSOLE_CONVERSION_PATTERN: &str = "[%d] %p %m (%c)%n"; -/// Return the address of the Vector aggregator if the corresponding ConfigMap name is given in the -/// cluster spec -pub async fn resolve_vector_aggregator_address( - kafka: &v1alpha1::KafkaCluster, - client: &Client, -) -> Result> { - let vector_aggregator_address = if let Some(vector_aggregator_config_map_name) = &kafka - .spec - .cluster_config - .vector_aggregator_config_map_name - .as_ref() - { - let vector_aggregator_address = client - .get::( - vector_aggregator_config_map_name, - kafka - .namespace() - .as_deref() - .context(ObjectHasNoNamespaceSnafu)?, - ) - .await - .context(ConfigMapNotFoundSnafu { - cm_name: vector_aggregator_config_map_name.to_string(), - })? - .data - .and_then(|mut data| data.remove(VECTOR_AGGREGATOR_CM_ENTRY)) - .context(MissingConfigMapEntrySnafu { - entry: VECTOR_AGGREGATOR_CM_ENTRY, - cm_name: vector_aggregator_config_map_name.to_string(), - })?; - Some(vector_aggregator_address) - } else { - None - }; - - Ok(vector_aggregator_address) -} - /// Extend the role group ConfigMap with logging and Vector configurations pub fn extend_role_group_config_map( rolegroup: &RoleGroupRef, - vector_aggregator_address: Option<&str>, logging: &Logging, cm_builder: &mut ConfigMapBuilder, ) -> Result<()> { @@ -130,11 +84,7 @@ pub fn extend_role_group_config_map( if logging.enable_vector_agent { cm_builder.add_data( product_logging::framework::VECTOR_CONFIG_FILE, - product_logging::framework::create_vector_config( - rolegroup, - vector_aggregator_address.context(MissingVectorAggregatorAddressSnafu)?, - vector_log_config, - ), + product_logging::framework::create_vector_config(rolegroup, vector_log_config), ); } From 7bc61755490542d87b85035886b4975b18a639ae Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Tue, 8 Apr 2025 14:17:49 +0200 Subject: [PATCH 2/5] add pr number to changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f37ea08..96e38d5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,14 +11,14 @@ All notable changes to this project will be documented in this file. (or via `--rolling-logs `). - Replace stackable-operator `print_startup_string` with `tracing::info!` with fields. - BREAKING: Inject the vector aggregator address into the vector config using the env var `VECTOR_AGGREGATOR_ADDRESS` instead - of having the operator write it to the vector config ([#XXX]). + of having the operator write it to the vector config ([#844]). ### Fixed -- Fix a bug where changes to ConfigMaps that are referenced in the KafkaCluster spec didn't trigger a reconciliation ([#XXX]). +- Fix a bug where changes to ConfigMaps that are referenced in the KafkaCluster spec didn't trigger a reconciliation ([#844]). [#840]: https://github.com/stackabletech/kafka-operator/pull/840 -[#XXX]: https://github.com/stackabletech/kafka-operator/pull/XXX +[#844]: https://github.com/stackabletech/kafka-operator/pull/844 ## [25.3.0] - 2025-03-21 From 035b195e0372d83a99d0107c4a6d39ef19963de5 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Wed, 9 Apr 2025 16:19:15 +0200 Subject: [PATCH 3/5] rename store --- rust/operator-binary/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 125f87da..5f982dbf 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -162,7 +162,7 @@ pub async fn create_controller( namespace.get_api::>(&client), watcher::Config::default(), ); - let kafka_store_1 = kafka_controller.store(); + let config_map_store = kafka_controller.store(); kafka_controller .owns( namespace.get_api::(&client), @@ -193,7 +193,7 @@ pub async fn create_controller( namespace.get_api::>(&client), watcher::Config::default(), move |config_map| { - kafka_store_1 + config_map_store .state() .into_iter() .filter(move |kafka| references_config_map(kafka, &config_map)) From f31690710ba306debac9aeab6815e169b5b795db Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Wed, 9 Apr 2025 18:37:15 +0200 Subject: [PATCH 4/5] chore: Use borrows --- rust/operator-binary/src/kafka_controller.rs | 9 ++------- rust/operator-binary/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/rust/operator-binary/src/kafka_controller.rs b/rust/operator-binary/src/kafka_controller.rs index f1a73301..1fc37461 100644 --- a/rust/operator-binary/src/kafka_controller.rs +++ b/rust/operator-binary/src/kafka_controller.rs @@ -1099,12 +1099,7 @@ fn build_broker_rolegroup_statefulset( // Add vector container after kafka container to keep the defaulting into kafka container if merged_config.logging.enable_vector_agent { - match kafka - .spec - .cluster_config - .vector_aggregator_config_map_name - .to_owned() - { + match &kafka.spec.cluster_config.vector_aggregator_config_map_name { Some(vector_aggregator_config_map_name) => { pod_builder.add_container( product_logging::framework::vector_container( @@ -1118,7 +1113,7 @@ fn build_broker_rolegroup_statefulset( .with_memory_request("128Mi") .with_memory_limit("128Mi") .build(), - &vector_aggregator_config_map_name, + vector_aggregator_config_map_name, ) .context(ConfigureLoggingSnafu)?, ); diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 5f982dbf..ab665bab 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -237,7 +237,7 @@ fn references_config_map( }; kafka.spec.cluster_config.zookeeper_config_map_name == config_map.name_any() - || match kafka.spec.cluster_config.authorization.opa.to_owned() { + || match &kafka.spec.cluster_config.authorization.opa { Some(opa_config) => opa_config.config_map_name == config_map.name_any(), None => false, } From 1be900b200ebf9cacbee5a09ca437ca4ad7d3a7d Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Wed, 9 Apr 2025 18:53:04 +0200 Subject: [PATCH 5/5] chore: Fix changelog headings --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4242950..3bcd5da0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,11 +15,8 @@ All notable changes to this project will be documented in this file. ### Fixed -- Fix a bug where changes to ConfigMaps that are referenced in the KafkaCluster spec didn't trigger a reconciliation ([#844]). - -### Fixed - - Use `json` file extension for log files ([#846]). +- Fix a bug where changes to ConfigMaps that are referenced in the KafkaCluster spec didn't trigger a reconciliation ([#844]). [#840]: https://github.com/stackabletech/kafka-operator/pull/840 [#844]: https://github.com/stackabletech/kafka-operator/pull/844