-
Couldn't load subscription status.
- Fork 1.4k
Description
Related problem
For configuring rack awareness, Strimzi uses an init container that requests node labels via the Kubernetes API and exports them to the Kafka brokers. See documentation: Configuring rack awareness and init container images. For this init container certain permissions are required, which would not be required otherwise, and the init container makes the deployment more complicated than non-rack aware deployments.
Suggested solution
Starting with Kubernetes 1.33, node topology labels are available via downward API. This is currently an alpha feature, but it appears to be enabled by default (at least in Amazon EKS).
It would be beneficial if we could support this feature when:
- a Kubernetes version is used, which supports it, and
- a
topologyKeyis used, which actually is exposed through the downward API.
It is important to note that not all node labels are available via the downward API, which means that it will cover only a subset of what is currently supported by Strimzi.
Because of this and because the feature is still alpha and only available in Kubernetes >1.33, I do not propose to remove the existing solution with the init container, but instead leave it to the users to decide how to obtain the topologyKey.
Here is a simple (albeit contrived) example of how this feature could be reflected in the Kafka spec:
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-cluster
spec:
kafka:
# ...
rack:
getTopologyKeyViaInitContainer: False
topologyKey: topology.kubernetes.io/zoneAlternatives
Leave everything as it is, since it works this way. However, utilizing this new feature would lead to more lightweight deployments in some cases.
Additional context
No response