canonical / kafka-k8s-operator

Kafka K8s operator
Apache License 2.0
7 stars 11 forks source link

[DPE-4952] Add add/remove broker capability to rebalance action #122

Closed Batalex closed 3 months ago

Batalex commented 3 months ago

This PR adds a new param to the rebalance action to pass broker ids to be added/removed to/from the cluster.

This parameter can be used as follows:

juju run kafka-k8s/leader rebalance mode=remove dryrun=false brokerid=4

Difference with Cruise control behavior

If we pass multiple brokers to remove to CC REST API, but all of them cannot be removed within the goals defined, Cruise Control will still move partition from some of the brokers. This means we need to assess the cluster state before removing units.

The charm limits the rebalance action to add/remove one unit at a time