Commit 3da95b6e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents 4b192f6c 2cb9f5d8
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment