Skip to main content

Module common

Module common 

Source
Expand description

Shared helpers across the Kafka and KafkaNodePool reconcilers.

The Kafka-owned cluster-level objects (Service, ConfigMap, cluster-id Secret) live here because both reconcilers need to refer to their names (the pool reconciler reads the Secret; the parent reconciler renders+applies them). The status-derivation helper, the SSA / merge-patch wrappers, and the labels / owner-ref helpers are shared verbatim.

Enums§

ReconcileError
Reconcile-error surface shared by both reconcilers.

Functions§

combined_config_hash
Combined hash over user spec.config, the canonical listener intent, a metrics_config.is_some() bit, and the cluster CA cert PEM. Empty listeners produce empty intent and metrics-unset produces an empty third segment, so the combined hash is identical to the bare config_hash(spec.config) for an unchanged spec.config with neither listeners nor metrics.
config_hash
Truncated SHA-256 hex digest (16 hex chars / 8 bytes of entropy) of the given content. Used to detect Kafka.spec.config changes that the K8s StatefulSet controller can’t see directly.