Deploy k8s to vSphere

This commit is contained in:
Pieter Noordhuis
2014-08-24 20:19:28 -07:00
parent bd2cbdc312
commit ad7f131a5b
17 changed files with 694 additions and 1 deletions

View File

@@ -33,6 +33,13 @@ detect-minions > /dev/null
MINIONS_FILE=/tmp/minions
$(dirname $0)/kubecfg.sh -template '{{range.Items}}{{.ID}}:{{end}}' list minions > ${MINIONS_FILE}
# On vSphere, use minion IPs as their names
if [ "$KUBERNETES_PROVIDER" == "vsphere" ]; then
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
MINION_NAMES[i]=${KUBE_MINION_IP_ADDRESSES[i]}
done
fi
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
# Grep returns an exit status of 1 when line is not found, so we need the : to always return a 0 exit status
count=$(grep -c ${MINION_NAMES[i]} ${MINIONS_FILE}) || :