Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

only connect to peers that have non-null ip address. fix #683 #1758

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/k8s/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ if [ ! -z "$LABEL_SELECTOR" ]; then

_PODS=$(curl -s $CA -H "$AUTH" $PROTO://${HOST}:${PORT}/api/v1/namespaces/${POD_NAMESPACE}/pods?labelSelector=$LABEL_SELECTOR|jq .items[].status.podIP|sed -e "s/\"//g")
LIST=

for server in $_PODS; do
LIST="${LIST}$server,"
if [ "$server" != "null" ] ; then
LIST="${LIST}$server,"
fi
done

export MT_CLUSTER_PEERS=$(echo $LIST | sed 's/,$//')
fi

Expand Down