mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
fix e2e service test container listening port
the e2e test container used for the "Networking Granular Checks: Services" tests only needs to listen in one port to perform do network checks. This port is unrelated to the other ports used in the test, so we may use a different number to avoid possible conflicts.
This commit is contained in:
parent
d0e06cf3e0
commit
d382f299a1
@ -53,8 +53,9 @@ const (
|
|||||||
// EndpointUDPPort is an endpoint UDP port for testing.
|
// EndpointUDPPort is an endpoint UDP port for testing.
|
||||||
EndpointUDPPort = 8081
|
EndpointUDPPort = 8081
|
||||||
// EndpointSCTPPort is an endpoint SCTP port for testing.
|
// EndpointSCTPPort is an endpoint SCTP port for testing.
|
||||||
EndpointSCTPPort = 8082
|
EndpointSCTPPort = 8082
|
||||||
testContainerHTTPPort = 8080
|
// testContainerHTTPPort is the test container http port.
|
||||||
|
testContainerHTTPPort = 9080
|
||||||
// ClusterHTTPPort is a cluster HTTP port for testing.
|
// ClusterHTTPPort is a cluster HTTP port for testing.
|
||||||
ClusterHTTPPort = 80
|
ClusterHTTPPort = 80
|
||||||
// ClusterUDPPort is a cluster UDP port for testing.
|
// ClusterUDPPort is a cluster UDP port for testing.
|
||||||
@ -573,8 +574,7 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod {
|
|||||||
ImagePullPolicy: v1.PullIfNotPresent,
|
ImagePullPolicy: v1.PullIfNotPresent,
|
||||||
Args: []string{
|
Args: []string{
|
||||||
"netexec",
|
"netexec",
|
||||||
fmt.Sprintf("--http-port=%d", EndpointHTTPPort),
|
fmt.Sprintf("--http-port=%d", testContainerHTTPPort),
|
||||||
fmt.Sprintf("--udp-port=%d", EndpointUDPPort),
|
|
||||||
},
|
},
|
||||||
Ports: []v1.ContainerPort{
|
Ports: []v1.ContainerPort{
|
||||||
{
|
{
|
||||||
@ -586,10 +586,6 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
// we want sctp to be optional as it will load the sctp kernel module
|
|
||||||
if config.SCTPEnabled {
|
|
||||||
pod.Spec.Containers[0].Args = append(pod.Spec.Containers[0].Args, fmt.Sprintf("--sctp-port=%d", EndpointSCTPPort))
|
|
||||||
}
|
|
||||||
return pod
|
return pod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user