strimzi-kafka-operator
strimzi-kafka-operator copied to clipboard
Add client rack-awareness support to Strimzi Bridge pods
Type of change
- Enhancement / new feature
- Documentation
Description
Implements #6610
If you configure a rack topologyKey for a KafkaBridge CRD then an init container will be added to the bridge pod to retrieve the value of rack.topologyKey and write it into a file in /opt/strimzi/init
. This /opt/strimzi/init
volume is also mounted into the bridge container so it can retrieve the rack.id at runtime and use it for consumer configuration.
There is a corresponding PR for the bridge to add the rack id to it's consumer configuration: https://github.com/strimzi/strimzi-kafka-bridge/pull/659
Why: You could configure your Kafka Bridge to prefer to consume from a broker in the same zone, potentially saving on inter-zone transfer costs. This may cost in overall message latency as you may be consuming from a follower for a topic-partition.
/opt/strimzi/init
was selected as the mount because strimzi-bridge startup scripts use a STRIMZI_HOME instead of KAFKA_HOME, this keeps the configuration within /opt/strimzi instead of introducting /opt/kafka to the image.
Checklist
Please go through this checklist and make sure all applicable tasks have been done
- [x] Write tests
- [x] Make sure all tests pass
- [ ] Update documentation
- [ ] Check RBAC rights for Kubernetes / OpenShift roles
- [ ] Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
- [x] Reference relevant issue(s) and close them after merging
- [x] Update CHANGELOG.md
- [ ] Supply screenshots for visual changes, such as Grafana dashboards
Can one of the admins verify this patch?
@robobario It looks like some of your changes to the CRD were not propagated through -> that is what failed the build. This should help to fix it:
ERROR: Uncommitted changes in derived resources:
M packaging/helm-charts/helm3/strimzi-kafka-operator/crds/046-Crd-kafkabridge.yaml
Run the following to add up-to-date resources:
mvn clean verify -DskipTests -DskipITs \
&& make crd_install \
&& make helm_install \
&& git add packaging/install/ packaging/helm-charts/ documentation/modules/appendix_crds.adoc cluster-operator/src/main/resources/cluster-roles \
&& git commit -s -m 'Update derived resources'
/azp run regression
Azure Pipelines successfully started running 1 pipeline(s).
@ppatierno Can you please have a look at this?
Thanks for the PR.