File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1680,16 +1680,17 @@ var _ = common.SIGDescribe("Services", func() {
1680
1680
}
1681
1681
}()
1682
1682
1683
- service := t .BuildServiceSpec ()
1684
- service .Spec .Type = v1 .ServiceTypeNodePort
1683
+ var service * v1.Service
1684
+ baseService := t .BuildServiceSpec ()
1685
+ baseService .Spec .Type = v1 .ServiceTypeNodePort
1685
1686
numberOfRetries := 5
1686
1687
ginkgo .By ("creating service " + serviceName + " with type NodePort in namespace " + ns )
1687
1688
var err error
1688
1689
for i := 0 ; i < numberOfRetries ; i ++ {
1689
1690
port , err := e2eservice .GetUnusedStaticNodePort ()
1690
1691
framework .ExpectNoError (err , "Static node port allocator was not able to find a free nodeport." )
1691
- service .Spec .Ports [0 ].NodePort = port
1692
- service , err = t .CreateService (service )
1692
+ baseService .Spec .Ports [0 ].NodePort = port
1693
+ service , err = t .CreateService (baseService )
1693
1694
// We will later delete this service and then recreate it with same nodeport. We need to ensure that
1694
1695
// another e2e test doesn't start listening on our old nodeport and conflicts re-creation of service
1695
1696
// hence we use ReserveStaticNodePort.
You can’t perform that action at this time.
0 commit comments