Commit e83ccfc6 authored by 黎博's avatar 黎博

修改java和node健康检查时间

parent a86194b5
...@@ -675,9 +675,9 @@ public class K8sService { ...@@ -675,9 +675,9 @@ public class K8sService {
Probe livenessProbe = new Probe(); Probe livenessProbe = new Probe();
livenessProbe.setExec(execAction); livenessProbe.setExec(execAction);
// 启动延时,容器延时启动健康检查的时间 // 启动延时,容器延时启动健康检查的时间
livenessProbe.setInitialDelaySeconds(200); livenessProbe.setInitialDelaySeconds(600);
// 间隔时间,进行健康检查的时间间隔 // 间隔时间,进行健康检查的时间间隔
livenessProbe.setPeriodSeconds(30); livenessProbe.setPeriodSeconds(60);
// 响应超时,每次健康检查响应的最大超时时间 // 响应超时,每次健康检查响应的最大超时时间
livenessProbe.setTimeoutSeconds(5); livenessProbe.setTimeoutSeconds(5);
// 健康阈值,表示后端容器从失败到成功的连续健康检查成功次数 // 健康阈值,表示后端容器从失败到成功的连续健康检查成功次数
...@@ -690,11 +690,11 @@ public class K8sService { ...@@ -690,11 +690,11 @@ public class K8sService {
Probe readinessProbe = new Probe(); Probe readinessProbe = new Probe();
readinessProbe.setExec(execAction); readinessProbe.setExec(execAction);
// 启动延时 // 启动延时
readinessProbe.setInitialDelaySeconds(30); readinessProbe.setInitialDelaySeconds(600);
// 响应超时 // 响应超时
readinessProbe.setTimeoutSeconds(5); readinessProbe.setTimeoutSeconds(5);
// 间隔时间 // 间隔时间
readinessProbe.setPeriodSeconds(10); readinessProbe.setPeriodSeconds(30);
// 健康阈值 // 健康阈值
readinessProbe.setSuccessThreshold(1); readinessProbe.setSuccessThreshold(1);
// 不健康阈值 // 不健康阈值
...@@ -889,17 +889,18 @@ public class K8sService { ...@@ -889,17 +889,18 @@ public class K8sService {
commandList.add("/home/quant_group/readyCheck.sh"); commandList.add("/home/quant_group/readyCheck.sh");
execAction.setCommand(commandList); execAction.setCommand(commandList);
livenessProbe.setExec(execAction); livenessProbe.setExec(execAction);
livenessProbe.setInitialDelaySeconds(100); livenessProbe.setInitialDelaySeconds(600);
livenessProbe.setSuccessThreshold(1); livenessProbe.setSuccessThreshold(1);
livenessProbe.setFailureThreshold(5); livenessProbe.setFailureThreshold(5);
livenessProbe.setPeriodSeconds(60);
container.setLivenessProbe(livenessProbe); container.setLivenessProbe(livenessProbe);
//readinessProbe //readinessProbe
Probe readinessProbe = new Probe(); Probe readinessProbe = new Probe();
readinessProbe.setExec(execAction); readinessProbe.setExec(execAction);
readinessProbe.setInitialDelaySeconds(30); readinessProbe.setInitialDelaySeconds(600);
readinessProbe.setTimeoutSeconds(2); readinessProbe.setTimeoutSeconds(2);
readinessProbe.setPeriodSeconds(5); readinessProbe.setPeriodSeconds(15);
container.setReadinessProbe(readinessProbe); container.setReadinessProbe(readinessProbe);
containerList.add(container); containerList.add(container);
......
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