canonical / kafka-operator

Kafka VM operator
Apache License 2.0
6 stars 14 forks source link

[DPE-5501][DPE-5234] Multi app #257

Closed zmraul closed 1 month ago

zmraul commented 1 month ago

Summary

This PR enables KRaft to be deployed on it's own application. It also extends the peer_cluster interface to accommodate controller role.


Data flow between "controller" and "broker":

controller-broker-data

Storage formatting

Formatting the storage before starting the cluster is a needed step on KRaft mode:

charmed-kafka.storage format --cluster-id $uuid -c server.properties --add-scram 'SCRAM-SHA-512=[name={user},password={password}]'

Running this command requires two things from the charm:

Once those conditions are met, the service is able to start.

On unit.id / node.id handling

KRaft mode requires all nodes on the cluster (controller, broker) to have unique id numbers. For the time being, the node.id setup will be as follows:

Other relevant changes: