Skip to content

Commit 7847789

Browse files
authored
Merge pull request #1165 from iwilltry42/main
Mounting binderhub_config.py instead of letting it be part of the image
2 parents a00bbbb + f08d55f commit 7847789

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

helm-chart/binderhub/templates/configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ data:
1919
values.yaml: |
2020
{{- $values | toYaml | nindent 4 }}
2121
22+
{{- /* Glob files to allow them to be mounted by the binderhub pod */ -}}
23+
{{- /* key=filename: value=content */ -}}
24+
{{- (.Files.Glob "files/*").AsConfig | nindent 2 }}

helm-chart/binderhub/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ spec:
6464
containers:
6565
- name: binder
6666
image: {{ .Values.image.name }}:{{ .Values.image.tag }}
67+
args:
68+
- --config
69+
- /etc/binderhub/config/binderhub_config.py
6770
volumeMounts:
6871
- mountPath: /etc/binderhub/config/
6972
name: config

helm-chart/images/binderhub/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ RUN pip install --no-cache-dir \
3838
*.whl \
3939
-r requirements.txt
4040

41-
# Copy the binderhub configuration to use.
42-
# FUTURE: Follow the approach taken in Z2JH:
43-
# https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/1478
44-
COPY helm-chart/images/binderhub/binderhub_config.py .
45-
46-
CMD ["python3", "-m", "binderhub"]
41+
ENTRYPOINT ["python3", "-m", "binderhub"]
42+
CMD ["--config", "/etc/binderhub/config/binderhub_config.py"]
4743
ENV PYTHONUNBUFFERED=1
4844
EXPOSE 8585

0 commit comments

Comments
 (0)