Kafka Node Pod Scaling
The current Strimzi module will build nodes in two groups:
Controller/Broker nodes
Broker only nodes
Depending on the number of nodes selected for an architecture, you will have 3, 5, or 7 nodes that will act as a controller for the environment. This is determined by the following locals in terraform:
terraform
# Convert the given number of broker pods into a controller/broker split and account for the smallest
# architecture of 3 nodes
locals {
possible_controller_counts = [for c in [3,5,7] : c if c < var.kafka_broker_pod_replica_count]
controller_count = var.kafka_broker_pod_replica_count <= 3 ? 3 : max(local.possible_controller_counts...)
broker_count = var.kafka_broker_pod_replica_count <= 3 ? 0 : var.kafka_broker_pod_replica_count - local.controller_count
kubernetes_namespace = "${var.k8s_namespace_prefix}"
}