File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -435,8 +435,10 @@ func (c *ClusterStatusController) initLeaseController(cluster *clusterv1alpha1.C
435435
436436func getClusterHealthStatus (clusterClient * util.ClusterClient ) (online , healthy bool ) {
437437 healthStatus , err := healthEndpointCheck (clusterClient .KubeClient , "/readyz" )
438- if err != nil && healthStatus == http .StatusNotFound {
439- // do health check with healthz endpoint if the readyz endpoint is not installed in member cluster
438+ if err != nil {
439+ // do health check with healthz endpoint in two cases:
440+ // 1. When the server is configured with --shutdown-delay-duration, /readyz returns failure but /healthz still serves success
441+ // 2. When the readyz endpoint is not installed in member cluster
440442 healthStatus , err = healthEndpointCheck (clusterClient .KubeClient , "/healthz" )
441443 }
442444
You can’t perform that action at this time.
0 commit comments