mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
[esipp-e2e] Change service port to avoid collision
This commit is contained in:
parent
e123311d8a
commit
2cb9f5d83d
@ -1411,7 +1411,16 @@ var _ = framework.KubeDescribe("ESIPP [Slow]", func() {
|
|||||||
jig := framework.NewServiceTestJig(cs, serviceName)
|
jig := framework.NewServiceTestJig(cs, serviceName)
|
||||||
nodes := jig.GetNodes(framework.MaxNodesForEndpointsTests)
|
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))
|
serviceLBNames = append(serviceLBNames, cloudprovider.GetLoadBalancerName(svc))
|
||||||
defer func() {
|
defer func() {
|
||||||
jig.ChangeServiceType(svc.Namespace, svc.Name, v1.ServiceTypeClusterIP, loadBalancerCreateTimeout)
|
jig.ChangeServiceType(svc.Namespace, svc.Name, v1.ServiceTypeClusterIP, loadBalancerCreateTimeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user