File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -435,8 +435,11 @@ func (c *ClusterStatusController) initLeaseController(cluster *clusterv1alpha1.C
435
435
436
436
func getClusterHealthStatus (clusterClient * util.ClusterClient ) (online , healthy bool ) {
437
437
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 && (healthStatus == http .StatusInternalServerError || healthStatus == http .StatusNotFound ) {
439
+ // do health check with healthz endpoint in two cases:
440
+ // 1. StatusInternalServerError(500): When the server is configured with --shutdown-delay-duration,
441
+ // /readyz returns failure but /healthz still serves success
442
+ // 2. StatusNotFound(404): When the readyz endpoint is not installed in member cluster
440
443
healthStatus , err = healthEndpointCheck (clusterClient .KubeClient , "/healthz" )
441
444
}
442
445
You can’t perform that action at this time.
0 commit comments