mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #47986 from MrHohn/e2e-esipp-change-port
Automatic merge from submit-queue (batch tested with PRs 47650, 47936, 47939, 47986, 48006) [esipp-e2e] Change service port to avoid collision **What this PR does / why we need it**: As https://github.com/kubernetes/kubernetes/issues/47745#issuecomment-310750499 indicates, changing service port in test to avoid collision. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47745 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
3da95b6ec3
@ -1411,7 +1411,16 @@ var _ = framework.KubeDescribe("ESIPP [Slow]", func() {
|
||||
jig := framework.NewServiceTestJig(cs, serviceName)
|
||||
nodes := jig.GetNodes(framework.MaxNodesForEndpointsTests)
|
||||
|
||||
svc := jig.CreateOnlyLocalLoadBalancerService(namespace, serviceName, loadBalancerCreateTimeout, false, nil)
|
||||
svc := jig.CreateOnlyLocalLoadBalancerService(namespace, serviceName, loadBalancerCreateTimeout, false,
|
||||
func(svc *v1.Service) {
|
||||
// Change service port to avoid collision with opened hostPorts
|
||||
// in other tests that run in parallel.
|
||||
if len(svc.Spec.Ports) != 0 {
|
||||
svc.Spec.Ports[0].TargetPort = intstr.FromInt(int(svc.Spec.Ports[0].Port))
|
||||
svc.Spec.Ports[0].Port = 8081
|
||||
}
|
||||
|
||||
})
|
||||
serviceLBNames = append(serviceLBNames, cloudprovider.GetLoadBalancerName(svc))
|
||||
defer func() {
|
||||
jig.ChangeServiceType(svc.Namespace, svc.Name, v1.ServiceTypeClusterIP, loadBalancerCreateTimeout)
|
||||
|
Loading…
Reference in New Issue
Block a user