Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The invalid 15-byte KRaft cluster ID causes kafka-cluster2 to fail storage initialization, blocking the documented bananas/blueberries flows and their verification.
1 open issue
What changed in this PR
Migrates the Kafka broker and Kafka mesh examples from ZooKeeper to KRaft to address startup failures with Confluent Kafka 8.x.
Changes:
- Pins both Kafka images to version
8.4.1with a digest. - Configures standalone broker/controller nodes and removes ZooKeeper.
- Updates verification startup lists and documentation while leaving Envoy configurations unchanged.
| File | Description |
|---|---|
| kafka/verify.sh | Removes ZooKeeper from startup services. |
| kafka/example.rst | Removes ZooKeeper from sample container output. |
| kafka/Dockerfile-zookeeper | Deletes the unused ZooKeeper image definition. |
| kafka/Dockerfile-kafka | Pins Kafka to version 8.4.1 and digest. |
| kafka/docker-compose.yaml | Replaces ZooKeeper with single-node KRaft configuration. |
| kafka-mesh/verify.sh | Removes ZooKeeper from startup services. |
| kafka-mesh/example.rst | Describes KRaft clusters and removes ZooKeeper output. |
| kafka-mesh/Dockerfile-zookeeper | Deletes the unused ZooKeeper image definition. |
| kafka-mesh/Dockerfile-kafka | Pins Kafka to version 8.4.1 and digest. |
| kafka-mesh/docker-compose.yaml | Configures two independent single-node KRaft clusters. |
Review effort: Balanced
| KAFKA_LISTENERS: PLAINTEXT://kafka-cluster2:9092 | ||
| KAFKA_NODE_ID: 1 | ||
| KAFKA_PROCESS_ROLES: broker,controller | ||
| CLUSTER_ID: N2QzOUExMjM0NTY3ODlB |
confluentinc/cp-kafka:latest moved to 8.x, which is KRaft-only and rejects the examples' ZooKeeper config (its entrypoint fails ub ensure KAFKA_PROCESS_ROLES), breaking both examples on the cp-kafka digest bumps (envoyproxy#1657/envoyproxy#1665). Pin the image to a concrete version, cp-kafka:8.4.1 (what :latest currently is), and convert both examples to single-node KRaft (broker+controller): drop the zookeeper service/Dockerfile, add KRaft env (NODE_ID, PROCESS_ROLES, CLUSTER_ID, controller listener/quorum). Give each broker a healthcheck (kafka-broker-api-versions on its own listener) so compose up --wait blocks until the broker is actually serving — without it the first client op races broker readiness under CI's parallel load and times out. envoy configs unchanged; verify.sh drops zookeeper from UPARGS; docs updated. Signed-off-by: Ryan Northey <ryan@synca.io>
| KAFKA_OPTS: "-Dzookeeper.4lw.commands.whitelist=ruok" | ||
| KAFKA_NODE_ID: 1 | ||
| KAFKA_PROCESS_ROLES: broker,controller | ||
| CLUSTER_ID: N2QzOUExMjM0NTY3ODlB |
| @@ -1 +1 @@ | |||
| FROM confluentinc/cp-kafka:latest@sha256:f1c091384a9fbbbe7db084583e3434800b9916744eeb0410b2500371ac95c157 | |||
| FROM confluentinc/cp-kafka:8.4.1@sha256:ea3cd1f6493a3d393c84052a436073e307b5fdb9696e407478b06fa0068385a1 | |||
Signed-off-by: Ryan Northey <ryan@synca.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

confluentinc/cp-kafka:latesthas moved to 8.x, which is KRaft-only and rejects the examples' ZooKeeper config — its entrypoint failsub ensure KAFKA_PROCESS_ROLESbefore anything starts. That's why the cp-kafka digest-bump PRs #1657 (kafka) and #1665 (kafka-mesh) both fail theexamplesjob (and why they were flaky before — the recent wait_for hardening just made the breakage deterministic).This fixes both properly:
:latest->confluentinc/cp-kafka:8.4.1@sha256:ea3cd1f...(the version:latestcurrently resolves to), in both examples.zookeeperservice andDockerfile-zookeeper, addKAFKA_NODE_ID/KAFKA_PROCESS_ROLES/CLUSTER_ID/ controller listener + quorum. kafka-mesh's two clusters become two standalone KRaft nodes.verify.shjust dropszookeeperfromUPARGS; docs updated to match.Both examples verified green locally with 8.4.1. Supersedes #1657 and #1665.
Now pinned to a concrete version, dependabot will bump the version tag (toward latest) rather than only chasing
:latest's digest.