Skip to content

Commit

Permalink
Merge pull request #922 from consideRatio/758-outdated-hub-restart-logic
Browse files Browse the repository at this point in the history
[Part 5 of #758] Update outdated logic for hub restarts
  • Loading branch information
minrk authored Sep 12, 2018
2 parents 4e57e2f + b5072bf commit bf1579c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions images/hub/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@

c.KubeSpawner.namespace = os.environ.get('POD_NAMESPACE', 'default')

# Use env var for this, since we want hub to restart when this changes
c.KubeSpawner.image_spec = os.environ['SINGLEUSER_IMAGE']

for trait, cfg_key in (
('start_timeout', 'start-timeout'),
Expand All @@ -68,6 +66,7 @@
):
set_config_if_not_none(c.KubeSpawner, trait, 'singleuser.' + cfg_key)

c.KubeSpawner.image_spec = get_config('singleuser.image-spec')
# Configure dynamically provisioning pvc
storage_type = get_config('singleuser.storage.type')
if storage_type == 'dynamic':
Expand Down
1 change: 1 addition & 0 deletions jupyterhub/templates/hub/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ data:
singleuser.cloud-metadata: |
{{- .Values.singleuser.cloudMetadata | toYaml | trimSuffix "\n" | nindent 4 }}
singleuser.start-timeout: {{ .Values.singleuser.startTimeout | quote }}
singleuser.image-spec: {{ .Values.singleuser.image.name }}:{{ .Values.singleuser.image.tag }}
singleuser.image-pull-policy: {{ .Values.singleuser.image.pullPolicy | quote }}
{{- if .Values.singleuser.imagePullSecret.enabled }}
singleuser.image-pull-secret-name: singleuser-image-credentials
Expand Down
3 changes: 0 additions & 3 deletions jupyterhub/templates/hub/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ spec:
{{- .Values.hub.resources | toYaml | trimSuffix "\n" | nindent 12 }}
imagePullPolicy: {{ .Values.hub.imagePullPolicy }}
env:
{{- /* Put this here directly so hub will restart when we change this */}}
- name: SINGLEUSER_IMAGE
value: "{{ .Values.singleuser.image.name }}:{{ .Values.singleuser.image.tag }}"
{{- if .Values.hub.cookieSecret }}
- name: JPY_COOKIE_SECRET
valueFrom:
Expand Down

0 comments on commit bf1579c

Please sign in to comment.