slene commented on a change in pull request #453:
URL:
https://github.com/apache/apisix-ingress-controller/pull/453#discussion_r636612657
##########
File path: pkg/apisix/cluster.go
##########
@@ -290,6 +310,51 @@ func (c *cluster) GlobalRule() GlobalRule {
return c.globalRules
}
+// HealthCheck implements Cluster.HealthCheck method.
+func (c *cluster) HealthCheck(ctx context.Context) (err error) {
+ if c.cacheSyncErr != nil {
Review comment:
> You mean health check should wait first time cache sync finished ?
The code above already implement it.
- The cluster sync have two state `syncing` `synced` only.
- When state is `synced` and has an error of health check. Just give up
leader and re-create cluster to syncing.
--
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]