Skip to content

Commit

Permalink
Finish k8s_support
Browse files Browse the repository at this point in the history
  • Loading branch information
hmzzrcs committed Jun 26, 2024
1 parent f1c2b59 commit b551ef8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions build/resources/join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ fi

set +e
#Check whether there is a POD ID in the result
ips=$( echo ${response} | jq -r '.subsets[].addresses[].ip' )

hostnames=$( echo ${response} | jq -r '.subsets[].addresses[].hostname' )
podHostName=$(hostname)
#If the ips is null
if [[ "$( echo ${ips} )" == '' ]]
if [[ "$( echo ${hostnames} )" == '' ]]
then
echo "There are no pods ip in Service "
exit 1
Expand All @@ -27,12 +27,12 @@ fi
set -e

#Traverses all the Node's IP
for ip in ${ips}
for hn in ${hostnames}
do
if [ ${ip} != ${POD_IP} ]
if [ ${hn} != ${podHostName} ]
then
#join the cluster
./apinto join --addr=${ip}:${APINTO_ADMIN_PORT}
./apinto join --addr=${hn}.${SVC_NAME}:${APINTO_ADMIN_PORT}
break
fi
done
2 changes: 1 addition & 1 deletion build/resources/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e

if [[ $APINTO_DEBUG == "true" ]]; then
#Launch the gateway
./apinto start
./apinto debug master
echo "[$(date "+%Y-%m-%d %H:%M:%S")] Gateway Stop"
exit 0
fi
Expand Down

0 comments on commit b551ef8

Please sign in to comment.