gianm commented on code in PR #17697:
URL: https://github.com/apache/druid/pull/17697#discussion_r1941531928


##########
distribution/docker/druid.sh:
##########
@@ -138,8 +138,15 @@ then
     setKey _common druid.zk.service.host "${ZOOKEEPER}"
 fi
 
-DRUID_SET_HOST_IP=${DRUID_SET_HOST_IP:-0}
-if [ "${DRUID_SET_HOST_IP}" = "1" ]
+if [ -z ${KUBERNETES_SERVICE_HOST} ]
+then
+  DRUID_SET_HOST=${DRUID_SET_HOST:-1}
+else
+  # Running in kubernetes
+  DRUID_SET_HOST=${DRUID_SET_HOST:-0}

Review Comment:
   Please include a comment about why the default is different inside and 
outside of k8s.



##########
distribution/docker/druid.sh:
##########
@@ -138,8 +138,15 @@ then
     setKey _common druid.zk.service.host "${ZOOKEEPER}"
 fi
 
-DRUID_SET_HOST_IP=${DRUID_SET_HOST_IP:-0}
-if [ "${DRUID_SET_HOST_IP}" = "1" ]
+if [ -z ${KUBERNETES_SERVICE_HOST} ]

Review Comment:
   Use `[ -z "${KUBERNETES_SERVICE_HOST}" ]` instead, it will work better if 
the variable has whitespace in it. Unlikely but still a good practice with 
shell scripting.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to