Skip to content

Commit

Permalink
Merge pull request #117 from Landoop/feat/SRE-991
Browse files Browse the repository at this point in the history
Add the SSL listener to the ADV_HOST when ENABLE_SSL=1
  • Loading branch information
andmarios committed Jun 26, 2019
2 parents ebf4e6b + a2614a6 commit 7464808
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup-and-run.sh
Expand Up @@ -203,6 +203,10 @@ if [[ -n ${ADV_HOST} ]]; then
echo -e "\e[92mSetting advertised host to \e[96m${ADV_HOST}\e[34m\e[92m.\e[34m"
if [[ -z ${KAFKA_ADVERTISED_LISTENERS} ]]; then
export KAFKA_ADVERTISED_LISTENERS="PLAINTEXT://${ADV_HOST}:${BROKER_PORT}"
# If SSL is enabled we need to know if we should update the advertised.listeners
TMP_ADV_LISTENERS_SET=true
else
TMP_ADV_LISTENERS_SET=false
fi
if [[ -z $CONNECT_REST_ADVERTISED_HOST_NAME ]]; then
export CONNECT_REST_ADVERTISED_HOST_NAME=${ADV_HOST}
Expand Down Expand Up @@ -416,7 +420,7 @@ ssl.truststore.type=JKS
EOF
sed -r -e "s|^(listeners=.*)|\1,SSL://:${BROKER_SSL_PORT}|" \
-i /var/run/broker/server.properties
if [[ -n ${ADV_HOST} ]] && [[ -z ${KAFKA_ADVERTISED_LISTENERS} ]]; then
if [[ -n ${ADV_HOST} ]] && [[ $TMP_ADV_LISTENERS_SET =~ $TRUE_REG ]]; then
sed -r \
-e "s|^(advertised.listeners=.*)|\1,SSL://${ADV_HOST}:${BROKER_SSL_PORT}|" \
-i /var/run/broker/server.properties
Expand Down

0 comments on commit 7464808

Please sign in to comment.