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

Mounting binderhub_config.py instead of letting it be part of the image #1165

Merged
merged 4 commits into from
Oct 19, 2020
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
3 changes: 3 additions & 0 deletions helm-chart/binderhub/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ data:
values.yaml: |
{{- $values | toYaml | nindent 4 }}

{{- /* Glob files to allow them to be mounted by the binderhub pod */ -}}
{{- /* key=filename: value=content */ -}}
{{- (.Files.Glob "files/*").AsConfig | nindent 2 }}
3 changes: 3 additions & 0 deletions helm-chart/binderhub/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ spec:
containers:
- name: binder
image: {{ .Values.image.name }}:{{ .Values.image.tag }}
args:
- --config
- /etc/binderhub/config/binderhub_config.py
volumeMounts:
- mountPath: /etc/binderhub/config/
name: config
Expand Down
8 changes: 2 additions & 6 deletions helm-chart/images/binderhub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ RUN pip install --no-cache-dir \
*.whl \
-r requirements.txt

# Copy the binderhub configuration to use.
# FUTURE: Follow the approach taken in Z2JH:
# https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/1478
COPY helm-chart/images/binderhub/binderhub_config.py .

CMD ["python3", "-m", "binderhub"]
ENTRYPOINT ["python3", "-m", "binderhub"]
CMD ["--config", "/etc/binderhub/config/binderhub_config.py"]
ENV PYTHONUNBUFFERED=1
EXPOSE 8585