diff --git a/cluster/common.sh b/cluster/common.sh index ab2e6050bdb..80264300522 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -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 diff --git a/cluster/juju/util.sh b/cluster/juju/util.sh index 3e11583ba01..798d72de37d 100755 --- a/cluster/juju/util.sh +++ b/cluster/juju/util.sh @@ -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() { diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index d42651baa61..c4832b38b38 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -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() { diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 4183597a62d..209a7d3a17a 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -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."