mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 05:21:58 +00:00
Don't require ICMP reject on UDP LB with no endpoints
Allow either drop or reject; we previously made the same change for TCP load balancers.
This commit is contained in:
parent
925cb2be30
commit
79394a1cbd
@ -387,8 +387,8 @@ var _ = common.SIGDescribe("LoadBalancers", feature.LoadBalancer, func() {
|
||||
err = udpJig.Scale(ctx, 0)
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
ginkgo.By("looking for ICMP REJECT on the UDP service's LoadBalancer")
|
||||
testRejectedUDP(ctx, udpIngressIP, svcPort, loadBalancerCreateTimeout)
|
||||
ginkgo.By("checking that the UDP service's LoadBalancer is not reachable")
|
||||
testNotReachableUDP(ctx, udpIngressIP, svcPort, loadBalancerCreateTimeout)
|
||||
|
||||
ginkgo.By("Scaling the pods to 1")
|
||||
err = udpJig.Scale(ctx, 1)
|
||||
|
@ -606,20 +606,6 @@ func testNotReachableUDP(ctx context.Context, host string, port int, timeout tim
|
||||
}
|
||||
}
|
||||
|
||||
// testRejectedUDP tests that the given host rejects a UDP request on the given port.
|
||||
func testRejectedUDP(ctx context.Context, host string, port int, timeout time.Duration) {
|
||||
pollfn := func(ctx context.Context) (bool, error) {
|
||||
result := pokeUDP(host, port, "echo hello", &UDPPokeParams{Timeout: 3 * time.Second})
|
||||
if result.Status == UDPRefused {
|
||||
return true, nil
|
||||
}
|
||||
return false, nil // caller can retry
|
||||
}
|
||||
if err := wait.PollUntilContextTimeout(ctx, framework.Poll, timeout, true, pollfn); err != nil {
|
||||
framework.Failf("UDP service %v:%v not rejected: %v", host, port, err)
|
||||
}
|
||||
}
|
||||
|
||||
// TestHTTPHealthCheckNodePort tests a HTTP connection by the given request to the given host and port.
|
||||
func TestHTTPHealthCheckNodePort(ctx context.Context, host string, port int, request string, timeout time.Duration, expectSucceed bool, threshold int) error {
|
||||
count := 0
|
||||
|
Loading…
Reference in New Issue
Block a user