Merge pull request #1034 from jbeda/vagrant-auth

Hard code auth for vagrant.
This commit is contained in:
brendandburns 2014-08-25 21:13:38 -07:00
commit 8a8e124d0d

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 "$@"