Remove the last provider-specific handling in kubectl.sh, ginkgo-e2e.sh

This commit is contained in:
Jeff Lowdermilk 2015-06-03 16:54:56 -07:00
parent 27704beae5
commit 47901b7edd
4 changed files with 9 additions and 10 deletions

View File

@ -65,7 +65,7 @@ function create-kubeconfig() {
user_args+=(
"--token=${KUBE_BEARER_TOKEN}"
)
else
elif [[ ! -z "${KUBE_USER:-}" && ! -z "${KUBE_PASSWORD:-}" ]]; then
user_args+=(
"--username=${KUBE_USER}"
"--password=${KUBE_PASSWORD}"
@ -87,7 +87,7 @@ function create-kubeconfig() {
# If we have a bearer token, also create a credential entry with basic auth
# so that it is easy to discover the basic auth password for your cluster
# to use in a web browser.
if [[ ! -z "${KUBE_BEARER_TOKEN:-}" ]]; then
if [[ ! -z "${KUBE_BEARER_TOKEN:-}" && ! -z "${KUBE_USER:-}" && ! -z "${KUBE_PASSWORD:-}" ]]; then
"${kubectl}" config set-credentials "${CONTEXT}-basic-auth" "--username=${KUBE_USER}" "--password=${KUBE_PASSWORD}"
fi

View File

@ -57,6 +57,9 @@ function kube-up() {
sleep-status
detect-master
detect-minions
export KUBE_MASTER_IP="${KUBE_MASTER_IP}:8080"
export CONTEXT="juju"
}
function kube-down() {

View File

@ -346,11 +346,14 @@ function kube-up {
}
((ii=ii+1))
done
wait
verify-cluster
detect-master
export KUBE_MASTER_IP="${KUBE_MASTER_IP}:8080"
export CONTEXT="ubuntu"
create-kubeconfig
}
function provision-master() {

View File

@ -60,13 +60,6 @@ if [[ -z "${AUTH_CONFIG:-}" ]]; then
auth_config=(
"--kubeconfig=${KUBECONFIG:-$DEFAULT_KUBECONFIG}"
)
if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then
# gcloud doesn't override the current-context, so we explicitly set it
detect-project &> /dev/null
auth_config+=(
"--context=gke_${PROJECT}_${ZONE}_${CLUSTER_NAME}"
)
fi
fi
else
echo "Conformance Test. No cloud-provider-specific preparation."