From fa493299098625ea3e03468ef4722a15d643fecd Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Mon, 29 Jun 2020 18:16:36 -0400 Subject: [PATCH] TW-804: Introducing the HostName variables for opensync-gw This variable will be overriden in the Helm chart to the IP Address of the opensync gw pod --- .../src/main/docker/app/run.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/opensync-gateway-cloud-docker/src/main/docker/app/run.sh b/opensync-gateway-cloud-docker/src/main/docker/app/run.sh index d3617db..6203dfe 100755 --- a/opensync-gateway-cloud-docker/src/main/docker/app/run.sh +++ b/opensync-gateway-cloud-docker/src/main/docker/app/run.sh @@ -14,7 +14,6 @@ CLIENT_MQTT_SSL_PROPS+=" -Dconnectus.mqttBroker.password=admin" OVSDB_MANAGER_HOST=${OVSDB_MANAGER} MQTT_BROKER_HOST="${MQTT_SERVER}" - BACKEND_SERVER="${BACKEND_SERVER}" OVSDB_PROPS=" " @@ -41,6 +40,16 @@ SPRING_EXTRA_PROPS=" --add-opens java.base/java.lang=ALL-UNNAMED" HOST_PROPS=" " HOST_PROPS+=" -Dtip.wlan.introspectTokenApi.host=${OVSDB_MANAGER_HOST}:444" +## These properties are used by the Routing Service and the values will be +## overridden in Helm chart to the IP-Address of running opensync-gw pod +## If OVSDB_MANAGER_IP variable is not defined, these properties default +## to the Hostname of the container +if [[ -n ${OVSDB_MANAGER_IP} ]] +then + HOST_PROPS+=" -Dtip.wlan.externalHostName=${OVSDB_MANAGER_IP}" + HOST_PROPS+=" -Dtip.wlan.internalHostName=${OVSDB_MANAGER_IP}" +fi + if [[ -n $BACKEND_SERVER ]] then echo Use specifed local host