From 21160c1463a46645a5b70e465988723ec1df6ccc Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Fri, 19 Jul 2019 12:27:13 -0400 Subject: [PATCH] envoy-config: fix port name in setup_backend.sh (#219) This should fix https://github.com/kubeflow/kubeflow/issues/3628. See also https://github.com/kubeflow/kubeflow/pull/3691 (which modified the wrong file). --- gcp/iap-ingress/base/config-map.yaml | 2 +- tests/iap-ingress-base_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcp/iap-ingress/base/config-map.yaml b/gcp/iap-ingress/base/config-map.yaml index e5cbf707095..5e181c9b322 100644 --- a/gcp/iap-ingress/base/config-map.yaml +++ b/gcp/iap-ingress/base/config-map.yaml @@ -115,7 +115,7 @@ data: . /var/shared/healthz.env # If node port or backend id change, so does the JWT audience. - CURR_NODE_PORT=$(kubectl --namespace=${NAMESPACE} get svc ${SERVICE} -o jsonpath='{.spec.ports[0].nodePort}') + CURR_NODE_PORT=$(kubectl --namespace=${NAMESPACE} get svc ${SERVICE} -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}') read -ra toks <<<"$(gcloud compute --project=${PROJECT} backend-services list --filter=name~k8s-be-${CURR_NODE_PORT}- --format='value(id,timeoutSec)')" CURR_BACKEND_ID="${toks[0]}" CURR_BACKEND_TIMEOUT="${toks[1]}" diff --git a/tests/iap-ingress-base_test.go b/tests/iap-ingress-base_test.go index efc434e0cd9..4a73857737c 100644 --- a/tests/iap-ingress-base_test.go +++ b/tests/iap-ingress-base_test.go @@ -225,7 +225,7 @@ data: . /var/shared/healthz.env # If node port or backend id change, so does the JWT audience. - CURR_NODE_PORT=$(kubectl --namespace=${NAMESPACE} get svc ${SERVICE} -o jsonpath='{.spec.ports[0].nodePort}') + CURR_NODE_PORT=$(kubectl --namespace=${NAMESPACE} get svc ${SERVICE} -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}') read -ra toks <<<"$(gcloud compute --project=${PROJECT} backend-services list --filter=name~k8s-be-${CURR_NODE_PORT}- --format='value(id,timeoutSec)')" CURR_BACKEND_ID="${toks[0]}" CURR_BACKEND_TIMEOUT="${toks[1]}"