Implement placeholder 'advertisedAddress' in kafkaAdvertisedListeners#1011
Conversation
|
I will add docs if the feature is accepted |
|
@Demogorgon314 did you have time to take a look ? |
|
@BewareMyPower @Demogorgon314 could we commit this patch ? |
|
What I concern is that the placeholder doesn't contain the special characters. Is there a possibility that |
kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaServiceConfiguration.java
Outdated
Show resolved
Hide resolved
@BewareMyPower the fact is that special characters don't play well with Helm/Bash/YAML...it is always a pain with escaping (underscore, dot, dollar symbol...) So I opted to use the same configuration entry that we have in broker.conf. We will document this very well I would add that initially I thought to resolve to advertisedAddress the case of "empty hostname", but that would have changed the current behaviour, so "advertisedAddress" is safer and backward compatible |
|
Thanks! I will follow up with docs next Monday |
…#1011) With this patch when you configure kafkaAdvertisedListeners you can use the special placeholder `advertisedAddress` that picks up the value configured for `advertisedAddress` in broker.conf. Something like: `kafkaAdvertisedListeners=PLAINTEXT://advertisedAddress:9092` Without this placeholder you have to inject the value using other external means, like adding stuff to the Helm Chart (status.podIP) and it is not trivial.
…#1011) With this patch when you configure kafkaAdvertisedListeners you can use the special placeholder `advertisedAddress` that picks up the value configured for `advertisedAddress` in broker.conf. Something like: `kafkaAdvertisedListeners=PLAINTEXT://advertisedAddress:9092` Without this placeholder you have to inject the value using other external means, like adding stuff to the Helm Chart (status.podIP) and it is not trivial.
…#1011) With this patch when you configure kafkaAdvertisedListeners you can use the special placeholder `advertisedAddress` that picks up the value configured for `advertisedAddress` in broker.conf. Something like: `kafkaAdvertisedListeners=PLAINTEXT://advertisedAddress:9092` Without this placeholder you have to inject the value using other external means, like adding stuff to the Helm Chart (status.podIP) and it is not trivial. (cherry picked from commit 4269ed3)
With this patch when you configure kafkaAdvertisedListeners you can use the special placeholder
advertisedAddressthat picks up the value configured foradvertisedAddressin broker.conf.Something like:
kafkaAdvertisedListeners=PLAINTEXT://advertisedAddress:9092Without this placeholder you have to inject the value using other external means, like adding stuff to the Helm Chart (status.podIP) and it is not trivial.