Aviv Dozorets
03/05/2024, 7:50 AMKafkaSource operators. Created small supplier that checks ec2 metadata and pulls AZ id.
But based on logs it only runs on JobManager. We don't have a way to enforce single az deployment (yet).Tamir Sagi
03/06/2024, 10:06 AMAviv Dozorets
03/06/2024, 11:05 AMKafkaSource starts on TM it already has resolved values.Tamir Sagi
03/06/2024, 11:46 AMAviv Dozorets
03/06/2024, 1:14 PMTamir Sagi
03/06/2024, 4:10 PMConsumerConfig.CLIENT_RACK_CONFIG to Kafka Source properties but I'm not sure it will even work properly(it will not know which zone the TM is running on).
(The support has has been added in Kafka-connector 3.1.0) [1]
I mentioned pod template as an option to play with TM topology constrains and node affinity.
If you intend to restrict to single AZ You can try to restrict TMs to be deployed on specific AZ (Not good for failover and HA) using Node Affinity + condition[2]
Assuming you know the AZ ID:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: topology.kubernetes.io/zone
operator: In
values:
- zone id
[1] https://cwiki.apache.org/confluence/display/FLINK/FLIP-268%3A+Kafka+Rack+Awareness
[2] https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinityAviv Dozorets
03/06/2024, 9:12 PMAviv Dozorets
03/06/2024, 9:12 PMAviv Dozorets
03/06/2024, 9:12 PM