Skip to content

Commit 3f47a6e

Browse files
committed
buildscripts: Fix kube contexts in the xds LB tests (#9389)
- The primary should've been `GKE_CLUSTER_PSM_LB` - The secondary cluster was not activated for LB tests. This resulted in the failover test failing, as it relies on workloads running in different zones.
1 parent 826a7c9 commit 3f47a6e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

buildscripts/kokoro/xds_k8s_lb.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ build_docker_images_if_needed() {
102102
# Globals:
103103
# TEST_DRIVER_FLAGFILE: Relative path to test driver flagfile
104104
# KUBE_CONTEXT: The name of kubectl context with GKE cluster access
105+
# SECONDARY_KUBE_CONTEXT: The name of kubectl context with secondary GKE cluster access, if any
105106
# TEST_XML_OUTPUT_DIR: Output directory for the test xUnit XML report
106107
# SERVER_IMAGE_NAME: Test server Docker image name
107108
# CLIENT_IMAGE_NAME: Test client Docker image name
@@ -120,6 +121,7 @@ run_test() {
120121
python -m "tests.${test_name}" \
121122
--flagfile="${TEST_DRIVER_FLAGFILE}" \
122123
--kube_context="${KUBE_CONTEXT}" \
124+
--secondary_kube_context="${SECONDARY_KUBE_CONTEXT}" \
123125
--server_image="${SERVER_IMAGE_NAME}:${GIT_COMMIT}" \
124126
--client_image="${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" \
125127
--testing_version="${TESTING_VERSION}" \
@@ -156,7 +158,8 @@ main() {
156158
echo "Sourcing test driver install script from: ${TEST_DRIVER_INSTALL_SCRIPT_URL}"
157159
source /dev/stdin <<< "$(curl -s "${TEST_DRIVER_INSTALL_SCRIPT_URL}")"
158160

159-
activate_gke_cluster GKE_CLUSTER_PSM_BASIC
161+
activate_gke_cluster GKE_CLUSTER_PSM_LB
162+
activate_secondary_gke_cluster GKE_CLUSTER_PSM_LB
160163

161164
set -x
162165
if [[ -n "${KOKORO_ARTIFACTS_DIR}" ]]; then

0 commit comments

Comments
 (0)