strimzi-kafka-operator icon indicating copy to clipboard operation
strimzi-kafka-operator copied to clipboard

Prevent Kafka broker scale down if it still contains replicas

Open ppatierno opened this issue 2 years ago • 0 comments

When the number of Kafka replicas is decreased in the Kafka CR the StatefulSet will shutdown the highest numbered brokers.

Currently, there is no check to see if these brokers contain any topic-partition replicas. The documentation recommends that all topic-partition replicas are reassigned before doing this scaling action. We should introduce a check, such that the Operator will refuse to scale down if the brokers that are to be removed still contain replicas.

Displaying appropriate warnings in the logs will prompt users to do the reassignment and hopefully reduce the chance of data loss.

ppatierno avatar Apr 27 '22 10:04 ppatierno