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