usernameisnull commented on code in PR #203: URL: https://github.com/apache/rocketmq-operator/pull/203#discussion_r1463286448
########## 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: ok,I add a POD_IP env, and we get this in the brokerGenConfig.sh,and use this ip to register ![image](https://github.com/apache/rocketmq-operator/assets/3390414/170f0fc9-307d-44f2-9632-a2628d480bdf) -- 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