Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1479 ] Make probes in hub configurable #1480

Merged
merged 1 commit into from
Nov 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions jupyterhub/templates/hub/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,26 @@ spec:
ports:
- containerPort: 8081
name: hub
## livenessProbe notes:
## We don't know how long hub database upgrades could take
## so having a liveness probe could be a bit risky unless we put
## a initialDelaySeconds value with long enough margin for that
## to not be an issue. If it is too short, we could end up aborting
## database upgrades midway or ending up in an infinite restart
## loop.
# livenessProbe:
# initialDelaySeconds: 30
# httpGet:
# path: {{ .Values.hub.baseUrl }}hub/health
# port: hub
{{- if .Values.hub.livenessProbe.enabled }}
# livenessProbe notes:
# We don't know how long hub database upgrades could take
# so having a liveness probe could be a bit risky unless we put
# a initialDelaySeconds value with long enough margin for that
# to not be an issue. If it is too short, we could end up aborting
# database upgrades midway or ending up in an infinite restart
# loop.
livenessProbe:
initialDelaySeconds: {{ .Values.hub.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.hub.livenessProbe.periodSeconds }}
httpGet:
path: {{ .Values.hub.baseUrl }}hub/health
port: hub
{{- end }}
{{- if .Values.hub.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.hub.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.hub.readinessProbe.periodSeconds }}
httpGet:
path: {{ .Values.hub.baseUrl }}hub/health
port: hub
{{- end }}
8 changes: 8 additions & 0 deletions jupyterhub/templates/proxy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ spec:
name: proxy-public
- containerPort: 8001
name: api
{{- if .Values.proxy.chp.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.proxy.chp.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.proxy.chp.livenessProbe.periodSeconds }}
httpGet:
path: /_chp_healthz
{{- if or $manualHTTPS $manualHTTPSwithsecret }}
Expand All @@ -115,7 +118,11 @@ spec:
port: proxy-public
scheme: HTTP
{{- end }}
{{- end }}
{{- if .Values.proxy.chp.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.proxy.chp.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.proxy.chp.readinessProbe.periodSeconds }}
httpGet:
path: /_chp_healthz
{{- if or $manualHTTPS $manualHTTPSwithsecret }}
Expand All @@ -125,3 +132,4 @@ spec:
port: proxy-public
scheme: HTTP
{{- end }}
{{- end }}
17 changes: 16 additions & 1 deletion jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ hub:
shutdownOnLogout:
templatePaths: []
templateVars: {}

livenessProbe:
enabled: false
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
enabled: true
initialDelaySeconds: 0
periodSeconds: 10

rbac:
enabled: true
Expand Down Expand Up @@ -125,6 +132,14 @@ proxy:
image:
name: jupyterhub/configurable-http-proxy
tag: 4.2.0
livenessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
enabled: true
initialDelaySeconds: 0
periodSeconds: 10
resources:
requests:
cpu: 200m
Expand Down