Merge pull request #2894 from aledbf/authbind

Use authbind to bind privileged ports
This commit is contained in:
k8s-ci-robot 2018-08-05 08:43:43 -07:00 committed by GitHub
commit 7f7f59df79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 48 additions and 69 deletions

View file

@ -741,7 +741,10 @@ func configureDynamically(pcfg *ingress.Configuration, port int) error {
backends := make([]*ingress.Backend, len(pcfg.Backends))
for i, backend := range pcfg.Backends {
service := &apiv1.Service{Spec: backend.Service.Spec}
var service *apiv1.Service
if backend.Service != nil {
service = &apiv1.Service{Spec: backend.Service.Spec}
}
luaBackend := &ingress.Backend{
Name: backend.Name,
Port: backend.Port,

View file

@ -80,9 +80,9 @@ func nginxExecCommand(args ...string) *exec.Cmd {
ngx = defBinary
}
cmdArgs := []string{"-c", cfgPath}
cmdArgs := []string{"--deep", ngx, "-c", cfgPath}
cmdArgs = append(cmdArgs, args...)
return exec.Command(ngx, cmdArgs...)
return exec.Command("authbind", cmdArgs...)
}
func nginxTestCommand(cfg string) *exec.Cmd {
@ -91,5 +91,5 @@ func nginxTestCommand(cfg string) *exec.Cmd {
ngx = defBinary
}
return exec.Command(ngx, "-c", cfg, "-t")
return exec.Command("authbind", "--deep", ngx, "-c", cfg, "-t")
}