mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Remove the last provider-specific handling in kubectl.sh, ginkgo-e2e.sh
This commit is contained in:
parent
27704beae5
commit
47901b7edd
@ -65,7 +65,7 @@ function create-kubeconfig() {
|
|||||||
user_args+=(
|
user_args+=(
|
||||||
"--token=${KUBE_BEARER_TOKEN}"
|
"--token=${KUBE_BEARER_TOKEN}"
|
||||||
)
|
)
|
||||||
else
|
elif [[ ! -z "${KUBE_USER:-}" && ! -z "${KUBE_PASSWORD:-}" ]]; then
|
||||||
user_args+=(
|
user_args+=(
|
||||||
"--username=${KUBE_USER}"
|
"--username=${KUBE_USER}"
|
||||||
"--password=${KUBE_PASSWORD}"
|
"--password=${KUBE_PASSWORD}"
|
||||||
@ -87,7 +87,7 @@ function create-kubeconfig() {
|
|||||||
# If we have a bearer token, also create a credential entry with basic auth
|
# 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
|
# so that it is easy to discover the basic auth password for your cluster
|
||||||
# to use in a web browser.
|
# 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}"
|
"${kubectl}" config set-credentials "${CONTEXT}-basic-auth" "--username=${KUBE_USER}" "--password=${KUBE_PASSWORD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -57,6 +57,9 @@ function kube-up() {
|
|||||||
sleep-status
|
sleep-status
|
||||||
detect-master
|
detect-master
|
||||||
detect-minions
|
detect-minions
|
||||||
|
|
||||||
|
export KUBE_MASTER_IP="${KUBE_MASTER_IP}:8080"
|
||||||
|
export CONTEXT="juju"
|
||||||
}
|
}
|
||||||
|
|
||||||
function kube-down() {
|
function kube-down() {
|
||||||
|
@ -346,11 +346,14 @@ function kube-up {
|
|||||||
}
|
}
|
||||||
|
|
||||||
((ii=ii+1))
|
((ii=ii+1))
|
||||||
|
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
|
|
||||||
verify-cluster
|
verify-cluster
|
||||||
|
detect-master
|
||||||
|
export KUBE_MASTER_IP="${KUBE_MASTER_IP}:8080"
|
||||||
|
export CONTEXT="ubuntu"
|
||||||
|
create-kubeconfig
|
||||||
}
|
}
|
||||||
|
|
||||||
function provision-master() {
|
function provision-master() {
|
||||||
|
@ -60,13 +60,6 @@ if [[ -z "${AUTH_CONFIG:-}" ]]; then
|
|||||||
auth_config=(
|
auth_config=(
|
||||||
"--kubeconfig=${KUBECONFIG:-$DEFAULT_KUBECONFIG}"
|
"--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
|
fi
|
||||||
else
|
else
|
||||||
echo "Conformance Test. No cloud-provider-specific preparation."
|
echo "Conformance Test. No cloud-provider-specific preparation."
|
||||||
|
Loading…
Reference in New Issue
Block a user