Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ All notable changes to this project will be documented in this file.
- A KRaft cluster without a `controllers` role is now rejected during validation.
Previously, the operator would create a cluster consisting only of `brokers` which would never
become healthy ([#1010]).
- `spec.clusterConfig.metadataManager` now uses PascalCase values (`ZooKeeper` and `KRaft`) as per
Kubernetes conventions. The lowercase values `zookeeper` and `kraft` are deprecated, but are still
accepted for backwards compatibility and may be removed in a future release ([#1034]).

### Removed

Expand All @@ -79,6 +82,7 @@ All notable changes to this project will be documented in this file.
[#1021]: https://github.com/stackabletech/kafka-operator/pull/1021
[#1022]: https://github.com/stackabletech/kafka-operator/pull/1022
[#1024]: https://github.com/stackabletech/kafka-operator/pull/1024
[#1034]: https://github.com/stackabletech/kafka-operator/pull/1034

## [26.7.0] - 2026-07-21

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/kafka/examples/kraft_migration/01-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: zookeeper
metadataManager: ZooKeeper
brokerIdPodConfigMapName: broker-ids
authentication:
- authenticationClass: kafka-client-auth-tls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: zookeeper
metadataManager: ZooKeeper
authentication:
- authenticationClass: kafka-client-auth-tls
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: zookeeper
metadataManager: ZooKeeper
authentication:
- authenticationClass: kafka-client-auth-tls
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: zookeeper
metadataManager: ZooKeeper
authentication:
- authenticationClass: kafka-client-auth-tls
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: kafka-client-auth-tls
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: zookeeper
metadataManager: ZooKeeper
authentication:
- authenticationClass: source-client-auth
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
productVersion: 3.9.2
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: target-client-auth
tls:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/kafka/pages/usage-guide/kraft-controller.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ metadata:
name: kafka
spec:
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
image:
productVersion: "3.9.2"
brokers:
Expand Down
13 changes: 8 additions & 5 deletions extra/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1030,16 +1030,17 @@ spec:

IMPORTANT: This property will be removed as soon as Kafka 3.x support is dropped.

Possible values are `zookeeper` and `kraft`.
Possible values are `ZooKeeper` and `KRaft`. The lowercase values `zookeeper` and `kraft`
are deprecated, but still accepted.

If not set, defaults to:

- `zookeeper` for Kafka versions below `4.0.0`.
- `kraft` for Kafka versions `4.0.0` and higher.
- `ZooKeeper` for Kafka versions below `4.0.0`.
- `KRaft` for Kafka versions `4.0.0` and higher.

Using `zookeeper` for Kafka versions `4.0.0` and higher is not supported.
Using `ZooKeeper` for Kafka versions `4.0.0` and higher is not supported.

When set to `kraft`, the operator will perform the following actions:
When set to `KRaft`, the operator will perform the following actions:

* Generate the Kafka cluster id.
* Assign broker roles and configure controller quorum voters in the `broker.properties` files.
Expand All @@ -1051,6 +1052,8 @@ spec:
This property is also useful when migrating from ZooKeeper to Kraft mode because it permits the operator
to reconcile controllers while still using ZooKeeper for brokers.
enum:
- ZooKeeper
- KRaft
- zookeeper
- kraft
- null
Expand Down
4 changes: 2 additions & 2 deletions rust/operator-binary/src/controller/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
default:
Expand Down Expand Up @@ -295,7 +295,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
default:
Expand Down
8 changes: 4 additions & 4 deletions rust/operator-binary/src/controller/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
default:
Expand Down Expand Up @@ -587,7 +587,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
default:
Expand Down Expand Up @@ -657,7 +657,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
a:
Expand Down Expand Up @@ -699,7 +699,7 @@ mod tests {
image:
productVersion: 3.9.2
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
controllers:
roleGroups:
default:
Expand Down
21 changes: 14 additions & 7 deletions rust/operator-binary/src/crd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,17 @@ pub mod versioned {
///
/// IMPORTANT: This property will be removed as soon as Kafka 3.x support is dropped.
///
/// Possible values are `zookeeper` and `kraft`.
/// Possible values are `ZooKeeper` and `KRaft`. The lowercase values `zookeeper` and `kraft`
/// are deprecated, but still accepted.
///
/// If not set, defaults to:
///
/// - `zookeeper` for Kafka versions below `4.0.0`.
/// - `kraft` for Kafka versions `4.0.0` and higher.
/// - `ZooKeeper` for Kafka versions below `4.0.0`.
/// - `KRaft` for Kafka versions `4.0.0` and higher.
///
/// Using `zookeeper` for Kafka versions `4.0.0` and higher is not supported.
/// Using `ZooKeeper` for Kafka versions `4.0.0` and higher is not supported.
///
/// When set to `kraft`, the operator will perform the following actions:
/// When set to `KRaft`, the operator will perform the following actions:
///
/// * Generate the Kafka cluster id.
/// * Assign broker roles and configure controller quorum voters in the `broker.properties` files.
Expand Down Expand Up @@ -365,9 +366,15 @@ pub struct KafkaClusterStatus {
Serialize,
EnumString,
)]
#[serde(rename_all = "lowercase")]
#[serde(rename_all = "PascalCase")]
// schemars ignores `#[serde(alias)]` (https://github.com/GREsau/schemars/issues/338), so we need to
// list the aliases in the schema manually. Otherwise the API server rejects them.
#[schemars(extend("enum" = ["ZooKeeper", "KRaft", "zookeeper", "kraft"]))]
pub enum MetadataManager {
// The lowercase aliases are deprecated and only kept for backwards compatibility.
#[serde(alias = "zookeeper")]
ZooKeeper,
#[serde(alias = "kraft")]
KRaft,
}

Expand Down Expand Up @@ -669,7 +676,7 @@ mod tests {
reconciliationPaused: false
stopped: true
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: my-kerberos
authorization:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ commands:
pullPolicy: IfNotPresent
clusterConfig:
# KRaft: metadata is managed by the controllers role, no ZooKeeper involved.
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: kerberos-auth-$NAMESPACE
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ commands:
pullPolicy: IfNotPresent
clusterConfig:
# KRaft: metadata is managed by the controllers role, no ZooKeeper involved.
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: kerberos-auth-$NAMESPACE
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ commands:
pullPolicy: IfNotPresent
clusterConfig:
# KRaft: metadata is managed by the controllers role, no ZooKeeper involved.
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: kerberos-auth-$NAMESPACE
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
productVersion: "{{ test_scenario['values']['kafka-kraft'] }}"
{% endif %}
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
productVersion: "{{ test_scenario['values']['kafka-kraft'] }}"
{% endif %}
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
productVersion: "{{ test_scenario['values']['kafka-kraft'] }}"
{% endif %}
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{% endif %}
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
controllers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
{% endif %}
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
controllers:
Expand Down
2 changes: 1 addition & 1 deletion tests/templates/kuttl/smoke-kraft/30-install-kafka.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
metadataManager: kraft
metadataManager: KRaft
authentication:
- authenticationClass: test-kafka-client-auth-tls
tls:
Expand Down
2 changes: 1 addition & 1 deletion tests/templates/kuttl/upgrade/02-install-kafka.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
clusterConfig:
# Need to set this explicitly because the default would be zookeeper for 3.9.2
# but we don't want to test zookeeper -> kraft migration here
metadataManager: kraft
metadataManager: KRaft
{% if test_scenario['values']['use-client-auth-tls'] == 'true' %}
authentication:
- authenticationClass: test-kafka-client-auth-tls
Expand Down
Loading