Skip to content

Commit a2a6b82

Browse files
droctothorpeAlexander Perlman
and
Alexander Perlman
authored
Add liveness and readiness probes to API deployment (dask#256)
* Add liveness and readiness probes to API deployment Co-authored-by: Alexander Perlman <alex@Alexanders-MacBook-Pro.local>
1 parent cb3d36c commit a2a6b82

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ htmlcov/
77
.cache/
88
.pytest_cache/
99
.DS_Store
10+
.vscode

resources/helm/dask-gateway/templates/gateway/deployment.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,25 @@ spec:
5757
ports:
5858
- containerPort: 8000
5959
name: api
60+
61+
{{- if .Values.gateway.livenessProbe.enabled }}
62+
livenessProbe:
63+
httpGet:
64+
path: /api/health
65+
port: api
66+
initialDelaySeconds: {{ .Values.gateway.livenessProbe.initialDelaySeconds }}
67+
periodSeconds: {{ .Values.gateway.livenessProbe.periodSeconds }}
68+
timeoutSeconds: {{ .Values.gateway.livenessProbe.timeoutSeconds }}
69+
failureThreshold: {{ .Values.gateway.livenessProbe.failureThreshold }}
70+
{{- end }}
71+
72+
{{- if .Values.gateway.readinessProbe.enabled }}
73+
readinessProbe:
74+
httpGet:
75+
path: /api/health
76+
port: api
77+
initialDelaySeconds: {{ .Values.gateway.readinessProbe.initialDelaySeconds }}
78+
periodSeconds: {{ .Values.gateway.readinessProbe.periodSeconds }}
79+
timeoutSeconds: {{ .Values.gateway.readinessProbe.timeoutSeconds }}
80+
failureThreshold: {{ .Values.gateway.readinessProbe.failureThreshold }}
81+
{{- end }}

resources/helm/dask-gateway/values.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ gateway:
5454
# Configuration fields to set on the authenticator class.
5555
options: {}
5656

57+
livenessProbe:
58+
# Enables the livenessProbe.
59+
enabled: true
60+
# Configures the livenessProbe.
61+
initialDelaySeconds: 5
62+
timeoutSeconds: 2
63+
periodSeconds: 10
64+
failureThreshold: 6
65+
readinessProbe:
66+
# Enables the readinessProbe.
67+
enabled: true
68+
# Configures the readinessProbe.
69+
initialDelaySeconds: 5
70+
timeoutSeconds: 2
71+
periodSeconds: 10
72+
failureThreshold: 3
73+
5774
backend:
5875
# The image to use for both schedulers and workers.
5976
image:

0 commit comments

Comments
 (0)