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

--
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]