Fix insufficient privileges to bind to port

Container without elevated privileges to bind to
host port less than 1024 causes bind permission
denied error.
Increase port number greater than 1024 to allow
binding.

Signed-off-by: Martin Kennelly <mkennell@redhat.com>
This commit is contained in:
Martin Kennelly 2021-08-13 18:30:47 +01:00
parent b6d83f0ba3
commit eba9d33c3e

View File

@ -2134,14 +2134,14 @@ var _ = common.SIGDescribe("Services", func() {
serviceName := "svc-itp"
ns := f.Namespace.Name
servicePort := 80
servicePort := 8000
ginkgo.By("creating a TCP service " + serviceName + " with type=ClusterIP and internalTrafficPolicy=Local in namespace " + ns)
local := v1.ServiceInternalTrafficPolicyLocal
jig := e2eservice.NewTestJig(cs, ns, serviceName)
svc, err := jig.CreateTCPService(func(svc *v1.Service) {
svc.Spec.Ports = []v1.ServicePort{
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(80)},
{Port: 8000, Name: "http", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(8000)},
}
svc.Spec.InternalTrafficPolicy = &local
})
@ -2214,14 +2214,14 @@ var _ = common.SIGDescribe("Services", func() {
serviceName := "svc-itp"
ns := f.Namespace.Name
servicePort := 80
servicePort := 8000
ginkgo.By("creating a TCP service " + serviceName + " with type=ClusterIP and internalTrafficPolicy=Local in namespace " + ns)
local := v1.ServiceInternalTrafficPolicyLocal
jig := e2eservice.NewTestJig(cs, ns, serviceName)
svc, err := jig.CreateTCPService(func(svc *v1.Service) {
svc.Spec.Ports = []v1.ServicePort{
{Port: 80, Name: "http", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(80)},
{Port: 8000, Name: "http", Protocol: v1.ProtocolTCP, TargetPort: intstr.FromInt(8000)},
}
svc.Spec.InternalTrafficPolicy = &local
})