From 42674aee91f9f9105bd6adb427d5b177f554bdc4 Mon Sep 17 00:00:00 2001 From: sunfangbin Date: Tue, 7 Dec 2021 09:30:38 +0800 Subject: [PATCH] [KYUUBI #1513] Added support liveness and readiness for kyuubi pod ### _Why are the changes needed?_ It is better to support `livenessProbe` and `readinessProbe` for indicating whether the container is running. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1513 from murong00/branch-1513. Closes #1513 ea1ff6f6 [sunfangbin] keep the same ordering 6e7d7f07 [sunfangbin] Added support liveness and readiness for kyuubi pod Authored-by: sunfangbin Signed-off-by: ulysses-you --- docker/helm/templates/kyuubi-deployment.yaml | 16 ++++++++++++++++ docker/helm/values.yaml | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/docker/helm/templates/kyuubi-deployment.yaml b/docker/helm/templates/kyuubi-deployment.yaml index 29ae6a3a561..ca4b854de49 100644 --- a/docker/helm/templates/kyuubi-deployment.yaml +++ b/docker/helm/templates/kyuubi-deployment.yaml @@ -43,6 +43,22 @@ spec: - name: frontend-port containerPort: {{ .Values.server.bind.port }} protocol: TCP + {{- if .Values.probe.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.server.bind.port } + initialDelaySeconds: {{ .Values.probe.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probe.liveness.periodSeconds }} + failureThreshold: {{ .Values.probe.liveness.failureThreshold }} + {{- end }} + {{- if .Values.probe.readiness.enabled }} + readinessProbe: + tcpSocket: + port: {{ .Values.server.bind.port } + initialDelaySeconds: {{ .Values.probe.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probe.readiness.periodSeconds }} + failureThreshold: {{ .Values.probe.readiness.failureThreshold }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index b8356d058ca..e7f5708732e 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -28,6 +28,18 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "master-snapshot" +probe: + liveness: + enabled: true + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 10 + readiness: + enabled: true + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 10 + server: bind: host: 0.0.0.0