slene commented on a change in pull request #453:
URL:
https://github.com/apache/apisix-ingress-controller/pull/453#discussion_r636616387
##########
File path: pkg/ingress/controller.go
##########
@@ -317,30 +325,47 @@ election:
}
func (c *Controller) run(ctx context.Context) {
- log.Infow("controller now is running as leader",
+ log.Infow("controller tries to leading ...",
zap.String("namespace", c.namespace),
zap.String("pod", c.name),
)
+
+ var cancelFunc context.CancelFunc
Review comment:
The cancelFunc manage context of c.run, leaderContextCancelFun just
manage the election context.
If call leaderContextCancelFun in health check the election will run into
next loop and not wait last c.run exited.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]