diff --git a/cluster/kubectl.sh b/cluster/kubectl.sh index c6dded5ec48..da8ab8dfdd0 100755 --- a/cluster/kubectl.sh +++ b/cluster/kubectl.sh @@ -105,10 +105,10 @@ if [[ "$KUBERNETES_PROVIDER" == "gke" ]]; then config=( "--context=gke_${PROJECT}_${ZONE}_${CLUSTER_NAME}" ) - # In gcloud versions prior to 0.9.59, GKE stores it's kubeconfig + # In gcloud versions prior to 0.9.59, GKE stores its kubeconfig # in a separate location. If the file doesn't exist, then use # the default kubeconfig file. - # TODO(roberthbailey): Remove this once gcloud 0.9.59 is released. + # TODO(roberthbailey): Remove this once gcloud 0.9.59 or above is released. if [[ -e "${HOME}/.config/gcloud/kubernetes/kubeconfig" ]]; then config+=( "--kubeconfig=${HOME}/.config/gcloud/kubernetes/kubeconfig" diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 60f944054fb..776294fe750 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -87,7 +87,10 @@ if [[ -z "${AUTH_CONFIG:-}" ]]; then detect-master >/dev/null - if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then + # In gcloud versions < 0.9.59, GKE stores its kubeconfig in a separate + # location. + # TODO: Remove this once gcloud 0.9.59 or above is released. + if [[ "${KUBERNETES_PROVIDER}" == "gke" && -e "${GCLOUD_CONFIG_DIR}/kubeconfig" ]]; then # GKE stores its own kubeconfig in gcloud's config directory. detect-project &> /dev/null auth_config=(