From 8f95583f3d76d1ab1d8be74b9735011a191f45e5 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 13 Jan 2023 14:19:47 -0800 Subject: [PATCH] pr: confirm UDP ingress IP matches --- internal/util/test/controller_manager.go | 1 + test/integration/udpingress_test.go | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/util/test/controller_manager.go b/internal/util/test/controller_manager.go index 93efa616b8..236f6fefa4 100644 --- a/internal/util/test/controller_manager.go +++ b/internal/util/test/controller_manager.go @@ -74,6 +74,7 @@ func DeployControllerManagerForCluster( fmt.Sprintf("--kubeconfig=%s", kubeconfig.Name()), "--election-id=integrationtests.konghq.com", "--publish-service=kong-system/ingress-controller-kong-proxy", + "--publish-service-udp=kong-system/ingress-controller-kong-udp-proxy", "--log-format=text", } controllerManagerFlags = append(controllerManagerFlags, additionalFlags...) diff --git a/test/integration/udpingress_test.go b/test/integration/udpingress_test.go index 9f67b4b0dd..8e1fbc128e 100644 --- a/test/integration/udpingress_test.go +++ b/test/integration/udpingress_test.go @@ -144,8 +144,11 @@ func TestUDPIngressEssentials(t *testing.T) { ingresses := curIng.Status.LoadBalancer.Ingress for _, ingress := range ingresses { if len(ingress.Hostname) > 0 || len(ingress.IP) > 0 { - t.Logf("udpingress hostname %s or ip %s is ready to redirect traffic.", ingress.Hostname, ingress.IP) - return true + proxyUDPIP := strings.Split(proxyUDPURL.Hostname(), ":")[0] + if ingress.IP == proxyUDPIP { + t.Logf("udpingress hostname %s or ip %s is ready to redirect traffic.", ingress.Hostname, ingress.IP) + return true + } } } return false