From 7921da5ee63ee4f10084c9a2f55fccc2f3dc9e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E6=99=93=E6=B3=A2?= Date: Wed, 15 Jul 2020 21:26:54 +0800 Subject: [PATCH] to avoid k8s readinessProbe remove the pod For sentinel , we just no need remove the pod just because of the dashboard unreachable. --- .../cloud/sentinel/endpoint/SentinelHealthIndicator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/endpoint/SentinelHealthIndicator.java b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/endpoint/SentinelHealthIndicator.java index 39b43408..996a483b 100644 --- a/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/endpoint/SentinelHealthIndicator.java +++ b/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/endpoint/SentinelHealthIndicator.java @@ -105,7 +105,7 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator { // If failed to send heartbeat message, means that the Dashboard is DOWN dashboardUp = false; detailMap.put("dashboard", - new Status(Status.DOWN.getCode(), String.format( + new Status(Status.UNKNOWN.getCode(), String.format( "the dashboard servers [%s] one of them can't be connected", consoleServerList))); } @@ -138,7 +138,7 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator { // DOWN dataSourceUp = false; dataSourceDetailMap.put(dataSourceBeanName, - new Status(Status.DOWN.getCode(), e.getMessage())); + new Status(Status.UNKNOWN.getCode(), e.getMessage())); } } @@ -147,7 +147,7 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator { builder.up().withDetails(detailMap); } else { - builder.down().withDetails(detailMap); + builder.unknown().withDetails(detailMap); } }