Commit d604ed96 authored by 黎博's avatar 黎博

java服务健康检查调整

parent 382faf5d
...@@ -708,8 +708,7 @@ public class K8sService { ...@@ -708,8 +708,7 @@ public class K8sService {
container.setResources(resourceRequirements); container.setResources(resourceRequirements);
// keystone、sc-task 健康检查单独处理 // keystone、sc-task、sc-auth、price-tracker 健康检查单独处理
if (StringUtils.equals(namespace, "gyl2") || StringUtils.equals(namespace, "vcc2")) {
if (StringUtils.equals(serviceName, "keystone") || StringUtils.equals(serviceName, "sc-task") || StringUtils.equals(serviceName, "sc-auth") || StringUtils.equals(serviceName, "price-tracker")) { if (StringUtils.equals(serviceName, "keystone") || StringUtils.equals(serviceName, "sc-task") || StringUtils.equals(serviceName, "sc-auth") || StringUtils.equals(serviceName, "price-tracker")) {
IntOrString httpPort = new IntOrStringBuilder().withIntVal(80).build(); IntOrString httpPort = new IntOrStringBuilder().withIntVal(80).build();
...@@ -741,9 +740,8 @@ public class K8sService { ...@@ -741,9 +740,8 @@ public class K8sService {
.build(); .build();
container.setReadinessProbe(readinessProbe); container.setReadinessProbe(readinessProbe);
}
} else { } else {
// 需要做健康检查的不创建存活检查和就绪检查 // 其他服务按照原有逻辑处理
List<String> noHealthCheckServiceList = Arrays.asList(noHealthCheckService.split(",")); List<String> noHealthCheckServiceList = Arrays.asList(noHealthCheckService.split(","));
if (!noHealthCheckServiceList.contains(serviceName)) { if (!noHealthCheckServiceList.contains(serviceName)) {
ExecAction execAction = new ExecAction(); ExecAction execAction = new ExecAction();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment