tao12345666333 commented on a change in pull request #770:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/770#discussion_r768570575



##########
File path: pkg/ingress/controller.go
##########
@@ -653,6 +653,10 @@ func (c *Controller) checkClusterHealth(ctx 
context.Context, cancelFunc context.
                if err != nil {
                        // Finally failed health check, then give up leader.
                        log.Warnf("failed to check health for default cluster: 
%s, give up leader", err)
+                       c.apiServer.HealthState.Lock()
+                       defer c.apiServer.HealthState.Unlock()
+
+                       c.apiServer.HealthState.Err = err

Review comment:
       @tokers  @mayocream I will merge this PR first, here you can continue to 
discuss in order to reach agreement.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to