Skip to content

Commit

Permalink
pr: confirm UDP ingress IP matches
Browse files Browse the repository at this point in the history
  • Loading branch information
rainest committed Jan 13, 2023
1 parent e91530c commit 8f95583
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/util/test/controller_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down
7 changes: 5 additions & 2 deletions test/integration/udpingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f95583

Please sign in to comment.