Hard code auth for vagrant.

This simplifies things when switching between providers.  Fixes #1033.
pull/6/head
Joe Beda 2014-08-25 16:45:45 -07:00
parent b8c57ea181
commit 9a2e867350
1 changed files with 13 additions and 1 deletions

View File

@ -23,9 +23,21 @@ if [ ! -x $CLOUDCFG ]; then
exit 1
fi
# When we are using vagrant it has hard coded auth. We repeat that here so that
# we don't clobber auth that might be used for a publicly facing cluster.
if [ "$KUBERNETES_PROVIDER" == "vagrant" ]; then
cat >~/.kubernetes_vagrant_auth <<EOF
{
"User": "vagrant",
"Password": "vagrant"
}
EOF
AUTH_CONFIG="-auth $HOME/.kubernetes_vagrant_auth"
fi
detect-master > /dev/null
if [ "$KUBE_MASTER_IP" != "" ] && [ "$KUBERNETES_MASTER" == "" ]; then
export KUBERNETES_MASTER=https://${KUBE_MASTER_IP}
fi
$CLOUDCFG "$@"
$CLOUDCFG $AUTH_CONFIG "$@"