From ceebea2f1a087cb0ba04c274a7e3239137608bcc Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Tue, 13 Aug 2024 15:39:17 -0700 Subject: [PATCH] Add cluster for a fallback test (#122) Trying to address this Kokoro failure: ``` + [21:10:41 UTC] Installing packages with apt, see install-apt.log + [21:11:21 UTC] Fetching GKE cluster credentials ERROR: (gcloud.container.clusters.get-credentials) One of [--location, --zone, --region] must be supplied. ``` --- .kokoro/psm_interop_kokoro_lib.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.kokoro/psm_interop_kokoro_lib.sh b/.kokoro/psm_interop_kokoro_lib.sh index 1574d2c1..1fdefd1b 100644 --- a/.kokoro/psm_interop_kokoro_lib.sh +++ b/.kokoro/psm_interop_kokoro_lib.sh @@ -206,9 +206,11 @@ psm::dualstack::run_test() { ####################################### # Fallback Test Suite setup. +# +# This test does not need GKE so setting variable to skip some init ####################################### psm::fallback::setup() { - : # Placeholder for future setup commands + NO_GKE_CLUSTER=1 } ####################################### @@ -911,6 +913,10 @@ gcloud_gcr_list_image_tags() { # Writes authorization info $HOME/.kube/config ####################################### gcloud_get_cluster_credentials() { + if [[ -n "${NO_GKE_CLUSTER}" ]]; then + psm::tools::log "Skipping cluster credentials" + return + fi # Secondary cluster, when set. if [[ -n "${SECONDARY_GKE_CLUSTER_NAME}" && -n "${SECONDARY_GKE_CLUSTER_ZONE}" ]]; then gcloud container clusters get-credentials "${SECONDARY_GKE_CLUSTER_NAME}" --zone "${SECONDARY_GKE_CLUSTER_ZONE}"