avoid hostNetwork pods conflict binding UDP ports

The agnhost pods using netexec will bind by default to the UDP
port 8081, use a different port for hostNetwork pods to avoid
scheduling conflicts and fail the tests.
This commit is contained in:
Antonio Ojea 2021-09-20 09:54:23 +02:00
parent bbd809cbd0
commit b55e6f2cd0

View File

@ -2235,7 +2235,7 @@ var _ = common.SIGDescribe("Services", func() {
framework.ExpectNoError(err)
ginkgo.By("Creating 1 webserver pod to be part of the TCP service")
webserverPod0 := e2epod.NewAgnhostPod(ns, "echo-hostname-0", nil, nil, nil, "netexec", "--http-port", strconv.Itoa(endpointPort))
webserverPod0 := e2epod.NewAgnhostPod(ns, "echo-hostname-0", nil, nil, nil, "netexec", "--http-port", strconv.Itoa(endpointPort), "--udp-port", strconv.Itoa(endpointPort))
webserverPod0.Labels = jig.Labels
webserverPod0.Spec.HostNetwork = true
e2epod.SetNodeSelection(&webserverPod0.Spec, e2epod.NodeSelection{Name: node0.Name})