1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

to avoid k8s readinessProbe remove the pod

For sentinel , we just no need remove the pod just because of the dashboard unreachable.
This commit is contained in:
祁晓波 2020-07-15 21:26:54 +08:00 committed by GitHub
parent f6fb6890b9
commit 7921da5ee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator {
// If failed to send heartbeat message, means that the Dashboard is DOWN // If failed to send heartbeat message, means that the Dashboard is DOWN
dashboardUp = false; dashboardUp = false;
detailMap.put("dashboard", 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", "the dashboard servers [%s] one of them can't be connected",
consoleServerList))); consoleServerList)));
} }
@ -138,7 +138,7 @@ public class SentinelHealthIndicator extends AbstractHealthIndicator {
// DOWN // DOWN
dataSourceUp = false; dataSourceUp = false;
dataSourceDetailMap.put(dataSourceBeanName, 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); builder.up().withDetails(detailMap);
} }
else { else {
builder.down().withDetails(detailMap); builder.unknown().withDetails(detailMap);
} }
} }