Conversation
Update Kafka-UI to the latest version.
There was a problem hiding this comment.
Pull request overview
Updates the CloudHarness “events” deployment to run Kafka as a single-node KRaft StatefulSet (removing ZooKeeper and related resources) and refreshes the bundled Kafka UI Helm chart/templates to newer versions and Kubernetes API expectations.
Changes:
- Switch events Kafka deployment to KRaft mode using
docker.io/apache/kafka:4.0.2, removing ZooKeeper/pzoo manifests and broker configmaps/scripts. - Update documentation for Kafka UI access and local troubleshooting/reset steps for KRaft PVC state.
- Update Kafka UI Helm chart (version bump + template updates for namespace, ingress pathType, LoadBalancer IP, etc.).
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/events.md | Update docs for Kafka UI, values-based config overrides, and KRaft PVC reset/local port-forwarding. |
| applications/events/deploy/values.yaml | Define new Kafka image/ports/KRaft config and remove ZooKeeper-related values. |
| applications/events/deploy/templates/zoo-config.yml | Remove ZooKeeper ConfigMap template. |
| applications/events/deploy/templates/services.yml | Update services for Kafka client/controller ports; remove ZooKeeper services. |
| applications/events/deploy/templates/roles.yml | Remove RBAC previously used for pod labeling/annotation in init scripts. |
| applications/events/deploy/templates/deployments.yml | Replace prior Kafka+ZooKeeper StatefulSets with a single KRaft Kafka StatefulSet. |
| applications/events/deploy/templates/broker-config.yml | Remove broker ConfigMap that provided legacy server/log4j configs. |
| applications/events/deploy/templates-compose/deployments.yaml | Simplify compose deployment to a single Kafka service configured for KRaft. |
| applications/events/deploy/resources/zookeeper/zookeeper.properties | Remove ZooKeeper configuration. |
| applications/events/deploy/resources/zookeeper/log4j.properties | Remove ZooKeeper logging configuration. |
| applications/events/deploy/resources/zookeeper/init.sh | Remove ZooKeeper init script. |
| applications/events/deploy/resources/broker/server.properties | Remove legacy broker server.properties. |
| applications/events/deploy/resources/broker/log4j.properties | Remove legacy broker log4j configuration. |
| applications/events/deploy/resources/broker/init.sh | Remove legacy broker init script (kubectl labeling, listener patching, etc.). |
| applications/events/deploy/charts/values.yaml | Add ingress pathType default and document optional LoadBalancer static IP. |
| applications/events/deploy/charts/templates/serviceaccount.yaml | Explicitly set namespace on ServiceAccount. |
| applications/events/deploy/charts/templates/service.yaml | Explicitly set namespace; optionally set loadBalancerIP. |
| applications/events/deploy/charts/templates/secret.yaml | Make Secret creation conditional; explicitly set namespace. |
| applications/events/deploy/charts/templates/networkpolicy-ingress.yaml | Explicitly set namespace. |
| applications/events/deploy/charts/templates/networkpolicy-egress.yaml | Explicitly set namespace. |
| applications/events/deploy/charts/templates/ingress.yaml | Add namespace; make pathType configurable; enhance backend port selection. |
| applications/events/deploy/charts/templates/hpa.yaml | Explicitly set namespace. |
| applications/events/deploy/charts/templates/deployment.yaml | Explicitly set namespace; adjust Spring config env var handling. |
| applications/events/deploy/charts/templates/configmap.yaml | Explicitly set namespace; minor template formatting. |
| applications/events/deploy/charts/templates/configmap_fromValues.yaml | Explicitly set namespace; minor template formatting. |
| applications/events/deploy/charts/templates/_helpers.tpl | Allow global image registry override (.Values.global.imageRegistry). |
| applications/events/deploy/charts/README.md | Replace inline README with link to upstream helm chart docs. |
| applications/events/deploy/charts/Chart.yaml | Bump Kafka UI chart version/appVersion. |
| kind: Service | ||
| metadata: | ||
| name: broker | ||
| spec: | ||
| clusterIP: None | ||
| ports: | ||
| - port: {{ .Values.apps.events.kafka.port }} | ||
| selector: | ||
| app: kafka | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: pzoo | ||
| spec: | ||
| clusterIP: None | ||
| ports: | ||
| - name: peer | ||
| port: 2888 | ||
| - name: leader-election | ||
| port: 3888 | ||
| selector: | ||
| app: zookeeper | ||
| storage: persistent | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: zookeeper | ||
| spec: | ||
| ports: | ||
| - name: client | ||
| port: 2181 | ||
| port: {{ .Values.apps.events.kafka.port }} | ||
| targetPort: client | ||
| - name: controller | ||
| port: {{ .Values.apps.events.kafka.controllerPort }} | ||
| targetPort: controller |
There was a problem hiding this comment.
The broker Service is headless (clusterIP: None) and is used for stable StatefulSet DNS names (e.g., kafka-0.broker.<ns>.svc.cluster.local) referenced by KAFKA_ADVERTISED_LISTENERS/KAFKA_CONTROLLER_QUORUM_VOTERS. Without publishNotReadyAddresses: true, Kubernetes DNS may not publish pod A records until the pod becomes Ready, which can deadlock startup when the broker needs to resolve those names during initialization. Consider setting publishNotReadyAddresses: true on the headless broker Service.
| ## Reset local KRaft state | ||
|
|
||
| Kafka metadata and log state are stored on the `kafka` PVC. If a local Minikube deployment gets stuck because of stale KRaft state, delete the broker pod and its PVC before redeploying: | ||
|
|
||
| ```bash | ||
| kubectl delete pod -n test kafka-0 | ||
| kubectl delete pvc -n test data-kafka-0 | ||
| ``` |
There was a problem hiding this comment.
This section mixes namespaces (test here vs mnp in the port-forward example below) and refers to a kafka PVC, but the PVC created by the StatefulSet is named data-kafka-0 (from the data volumeClaimTemplate). Consider using a single placeholder namespace consistently and referencing the actual PVC/claim name to avoid confusing reset instructions.
Closes CH-259
Implemented solution
Update kafka
Update kafka-ui
Configure Kafka in single-node KRaft
Remoe pzoo and zookeeper
How to test this PR
Deploy config with events and check sync works.
Verify Kafka-ui and topic creation / messages.
Sanity checks:
Breaking changes (select one):
breaking-changeand the migration procedure is well described abovePossible deployment updates issues (select one):
alert:deploymentTest coverage (select one):
Documentation (select one):
Nice to have (if relevant):