Skip to content

Commit

Permalink
[KYUUBI #1513] Added support liveness and readiness for kyuubi pod
Browse files Browse the repository at this point in the history
### _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

ea1ff6f [sunfangbin] keep the same ordering
6e7d7f0 [sunfangbin] Added support liveness and readiness for kyuubi pod

Authored-by: sunfangbin <sunfangbin@cmss.chinamobile.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
  • Loading branch information
murong00 authored and ulysses-you committed Dec 7, 2021
1 parent 4319df7 commit 42674ae
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docker/helm/templates/kyuubi-deployment.yaml
Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions docker/helm/values.yaml
Expand Up @@ -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
Expand Down

0 comments on commit 42674ae

Please sign in to comment.