caigy commented on code in PR #203: URL: https://github.com/apache/rocketmq-operator/pull/203#discussion_r1434724183
########## images/broker/alpine/brokerGenConfig.sh: ########## @@ -27,7 +27,12 @@ function create_config() { echo "brokerClusterName=$BROKER_CLUSTER_NAME" >> $BROKER_CONFIG_FILE echo "brokerName=$BROKER_NAME" >> $BROKER_CONFIG_FILE echo "brokerId=$BROKER_ID" >> $BROKER_CONFIG_FILE - echo "brokerIP1=`hostname -i`" >> $BROKER_CONFIG_FILE + # If the STATUS_POD_IP ip is not empty, the pod uses hostNetwork: true + if [ -n "${HOST_NETWORK_POD_IP}" ]; then + echo "brokerIP1=${HOST_NETWORK_POD_IP}" >> ${BROKER_CONFIG_FILE} + else + echo "brokerIP1=`hostname -i`" >> $BROKER_CONFIG_FILE + fi Review Comment: Should we always use `status.podIP` as `brokerIP1` instead of the output of `hostname`? -- 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org