Merge pull request #10027 from caesarxuchao/rethinkdb-example-v1

remove references to v1beta3 in rethinkdb example
pull/6/head
Satnam Singh 2015-06-18 11:40:59 -07:00
commit 458cbd3b5d
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ if [[ -n "${KUBERNETES_RO_SERVICE_HOST}" ]]; then
: ${NAMESPACE:=rethinkdb}
# try to pick up first different ip from endpoints
MYHOST=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
URL="${KUBERNETES_RO_SERVICE_HOST}/api/v1beta3/namespaces/${NAMESPACE}/endpoints/rethinkdb-driver"
URL="${KUBERNETES_RO_SERVICE_HOST}/api/v1/namespaces/${NAMESPACE}/endpoints/rethinkdb-driver"
IP=$(curl -s ${URL} | jq -s -r --arg h "${MYHOST}" '.[0].subsets | .[].addresses | [ .[].IP ] | map(select(. != $h)) | .[0]') || exit 1
[[ "${IP}" == null ]] && IP=""
fi