KYLIN-4807 Add liveness and readiness probe to k8s deployment
diff --git a/kubernetes/template/production/deployment/kylin/kylin-job-statefulset.yaml b/kubernetes/template/production/deployment/kylin/kylin-job-statefulset.yaml
index 494742a..5a6c68c 100644
--- a/kubernetes/template/production/deployment/kylin/kylin-job-statefulset.yaml
+++ b/kubernetes/template/production/deployment/kylin/kylin-job-statefulset.yaml
@@ -43,7 +43,7 @@
args:
- cp $KYLIN_HOME/tomcat-config/* $KYLIN_HOME/tomcat/conf;
cp $KYLIN_HOME/kylin-more-config $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/classes/;
- $TOOL_HOME/bootstrap.sh server -d;
+ $TOOL_HOME/bootstrap.sh server;
ports:
- containerPort: 7070
- containerPort: 7443
@@ -71,6 +71,19 @@
limits:
memory: 16Gi
cpu: 8
+ livenessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 100
+ periodSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 30
+ periodSeconds: 5
- name: filebeat
image: docker.elastic.co/beats/filebeat:6.4.3
args:
diff --git a/kubernetes/template/production/deployment/kylin/kylin-query-statefulset.yaml b/kubernetes/template/production/deployment/kylin/kylin-query-statefulset.yaml
index 2af2797..e5170a1 100644
--- a/kubernetes/template/production/deployment/kylin/kylin-query-statefulset.yaml
+++ b/kubernetes/template/production/deployment/kylin/kylin-query-statefulset.yaml
@@ -43,7 +43,7 @@
args:
- cp $KYLIN_HOME/tomcat-config/* $KYLIN_HOME/tomcat/conf;
cp $KYLIN_HOME/kylin-more-config $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/classes/;
- $TOOL_HOME/bootstrap.sh server -d;
+ $TOOL_HOME/bootstrap.sh server;
ports:
- containerPort: 7070
- containerPort: 7443
@@ -65,6 +65,19 @@
limits:
memory: 16Gi
cpu: 8
+ livenessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 100
+ periodSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 30
+ periodSeconds: 5
- name: filebeat
image: docker.elastic.co/beats/filebeat:6.4.3
args:
diff --git a/kubernetes/template/production/deployment/streaming/kylin-receiver-statefulset.yaml b/kubernetes/template/production/deployment/streaming/kylin-receiver-statefulset.yaml
index e611845..bbc084f 100644
--- a/kubernetes/template/production/deployment/streaming/kylin-receiver-statefulset.yaml
+++ b/kubernetes/template/production/deployment/streaming/kylin-receiver-statefulset.yaml
@@ -43,7 +43,7 @@
- sh
- -c
args:
- - $TOOL_HOME/bootstrap.sh streaming -d
+ - $TOOL_HOME/bootstrap.sh streaming
ports:
- containerPort: 9090
volumeMounts:
diff --git a/kubernetes/template/production/example/deployment/kylin-job/kylin-job-statefulset.yaml b/kubernetes/template/production/example/deployment/kylin-job/kylin-job-statefulset.yaml
index f85bc44..21cd5b7 100644
--- a/kubernetes/template/production/example/deployment/kylin-job/kylin-job-statefulset.yaml
+++ b/kubernetes/template/production/example/deployment/kylin-job/kylin-job-statefulset.yaml
@@ -49,7 +49,7 @@
args:
- cp $KYLIN_HOME/tomcat-config/* $KYLIN_HOME/tomcat/conf;
cp $KYLIN_HOME/kylin-more-config $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/classes/;
- $TOOL_HOME/bootstrap.sh server -d;
+ $TOOL_HOME/bootstrap.sh server;
ports:
- containerPort: 7070
- containerPort: 7443
@@ -77,6 +77,19 @@
limits:
memory: 2Gi
cpu: 1000m
+ livenessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 100
+ periodSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 30
+ periodSeconds: 5
- name: filebeat
image: docker.elastic.co/beats/filebeat:6.4.3
args:
diff --git a/kubernetes/template/production/example/deployment/kylin-query/kylin-query-statefulset.yaml b/kubernetes/template/production/example/deployment/kylin-query/kylin-query-statefulset.yaml
index 971f881..717aaeb 100644
--- a/kubernetes/template/production/example/deployment/kylin-query/kylin-query-statefulset.yaml
+++ b/kubernetes/template/production/example/deployment/kylin-query/kylin-query-statefulset.yaml
@@ -49,7 +49,7 @@
args:
- cp $KYLIN_HOME/tomcat-config/* $KYLIN_HOME/tomcat/conf;
cp $KYLIN_HOME/kylin-more-config $KYLIN_HOME/tomcat/webapps/kylin/WEB-INF/classes/;
- $TOOL_HOME/bootstrap.sh server -d;
+ $TOOL_HOME/bootstrap.sh server;
ports:
- containerPort: 7070
- containerPort: 7443
@@ -77,6 +77,19 @@
limits:
memory: 2Gi
cpu: 700m
+ livenessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 100
+ periodSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 30
+ periodSeconds: 5
- name: filebeat
image: docker.elastic.co/beats/filebeat:6.4.3
args:
diff --git a/kubernetes/template/quickstart/deployment/kylin/kylin-all-statefulset.yaml b/kubernetes/template/quickstart/deployment/kylin/kylin-all-statefulset.yaml
index e120285..f196027 100644
--- a/kubernetes/template/quickstart/deployment/kylin/kylin-all-statefulset.yaml
+++ b/kubernetes/template/quickstart/deployment/kylin/kylin-all-statefulset.yaml
@@ -47,7 +47,7 @@
- sh
- -c
args:
- - $TOOL_HOME/bootstrap.sh server -d;
+ - $TOOL_HOME/bootstrap.sh server;
ports:
- containerPort: 7070
- containerPort: 7443
@@ -71,6 +71,19 @@
limits:
memory: 4Gi
cpu: 2
+ livenessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 100
+ periodSeconds: 5
+ failureThreshold: 3
+ readinessProbe:
+ httpGet:
+ path: /kylin
+ port: 7070
+ initialDelaySeconds: 30
+ periodSeconds: 5
volumes:
- name: kylin-logs
emptyDir: