Skip to content

Commit 32e06ee

Browse files
committed
helm chart: add readinessProbe and let probes be configurable
1 parent f76e37e commit 32e06ee

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

helm-chart/binderhub/templates/deployment.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,23 @@ spec:
121121
ports:
122122
- containerPort: 8585
123123
name: binder
124+
{{- if .Values.deployment.readinessProbe.enabled }}
125+
readinessProbe:
126+
httpGet:
127+
path: {{ .Values.config.BinderHub.base_url | default "/" }}versions
128+
port: binder
129+
initialDelaySeconds: {{ .Values.deployment.readinessProbe.initialDelaySeconds }}
130+
periodSeconds: {{ .Values.deployment.readinessProbe.periodSeconds }}
131+
timeoutSeconds: {{ .Values.deployment.readinessProbe.timeoutSeconds }}
132+
failureThreshold: {{ .Values.deployment.readinessProbe.failureThreshold }}
133+
{{- end }}
134+
{{- if .Values.deployment.livenessProbe.enabled }}
124135
livenessProbe:
125136
httpGet:
126137
path: {{ .Values.config.BinderHub.base_url | default "/" }}versions
127138
port: binder
128-
initialDelaySeconds: 10
129-
periodSeconds: 5
130-
timeoutSeconds: 10
139+
initialDelaySeconds: {{ .Values.deployment.livenessProbe.initialDelaySeconds }}
140+
periodSeconds: {{ .Values.deployment.livenessProbe.periodSeconds }}
141+
timeoutSeconds: {{ .Values.deployment.livenessProbe.timeoutSeconds }}
142+
failureThreshold: {{ .Values.deployment.livenessProbe.failureThreshold }}
143+
{{- end }}

helm-chart/binderhub/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,18 @@ jupyterhub:
145145
enabled: false
146146

147147
deployment:
148+
readinessProbe:
149+
enabled: true
150+
initialDelaySeconds: 0
151+
periodSeconds: 5
152+
failureThreshold: 1000 # we rely on the liveness probe to resolve issues if needed
153+
timeoutSeconds: 3
154+
livenessProbe:
155+
enabled: true
156+
initialDelaySeconds: 10
157+
periodSeconds: 5
158+
failureThreshold: 3
159+
timeoutSeconds: 10
148160
labels: {}
149161

150162
dind:

0 commit comments

Comments
 (0)