Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Jul 8, 2020
1 parent 2b68d04 commit dbb5a24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
16 changes: 7 additions & 9 deletions cmd/nginx-ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,23 +523,21 @@ func main() {
}

lbc := k8s.NewLoadBalancerController(lbcInput)
<<<<<<< HEAD

if *appProtect {
go handleTerminationWithAppProtect(lbc, nginxManager, nginxDone, aPAgentDone, aPPluginDone)
} else {
go handleTermination(lbc, nginxManager, nginxDone)
}
=======
if *readyStatus {
go func() {
port := fmt.Sprintf(":%v", *readyStatusPort)
http.HandleFunc("/nginx-ready", ready(lbc))
glog.Fatal(http.ListenAndServe(port, nil))
}()
}
go handleTermination(lbc, nginxManager, nginxDone)
>>>>>>> 8611280a... Add readiness endpoint

if *appProtect {
go handleTerminationWithAppProtect(lbc, nginxManager, nginxDone, aPAgentDone, aPPluginDone)
} else {
go handleTermination(lbc, nginxManager, nginxDone)
}

lbc.Run()

for {
Expand Down
11 changes: 6 additions & 5 deletions internal/k8s/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,12 @@ func (lbc *LoadBalancerController) sync(task task) {
case appProtectLogConf:
lbc.syncAppProtectLogConf(task)
}

if lbc.firstRun && lbc.syncQueue.Len() == 0 {
lbc.firstRun = false
lbc.isNginxReady = true
glog.V(3).Infof("NGINX is ready")
}
}

func (lbc *LoadBalancerController) syncPolicy(task task) {
Expand Down Expand Up @@ -939,11 +945,6 @@ func (lbc *LoadBalancerController) syncPolicy(task task) {
}
}

if lbc.firstRun && lbc.syncQueue.Len() == 0 {
lbc.firstRun = false
lbc.isNginxReady = true
glog.V(3).Infof("NGINX is ready")
}
}

func (lbc *LoadBalancerController) syncTransportServer(task task) {
Expand Down

0 comments on commit dbb5a24

Please sign in to comment.