Skip to content

Commit

Permalink
WIP: Allow rendering chart without jupyterhub
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jun 28, 2024
1 parent 3a0f9c4 commit 5b298e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions helm-chart/binderhub/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ spec:
{{- . | toYaml | nindent 8 }}
{{- end }}
spec:
{{- if .Values.jupyterhub.enabled }}
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.image) }}
imagePullSecrets: {{ . }}
{{- end }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{- . | toYaml | nindent 8 }}
Expand Down Expand Up @@ -119,11 +121,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.jupyterhub.enabled }}
- name: JUPYTERHUB_API_TOKEN
valueFrom:
secretKeyRef:
name: "{{ include "jupyterhub.hub.fullname" . }}"
key: hub.services.binder.apiToken
{{- end }}
{{- if .Values.config.BinderHub.auth_enabled }}
- name: JUPYTERHUB_SERVICE_NAME
value: binder
Expand All @@ -142,9 +146,13 @@ spec:
value: {{ .Values.jupyterhub.hub.namedServerLimitPerUser | quote }}
{{- end }}
{{- end }}
{{- if .Values.jupyterhub.enabled }}
{{- with .Values.extraEnv }}
{{- include "jupyterhub.extraEnv" . | nindent 8 }}
{{- end }}
{{- else }}
{{ . | toYaml | nindent 8 }}
{{- end }}
ports:
- containerPort: 8585
name: binder
Expand Down
2 changes: 2 additions & 0 deletions helm-chart/binderhub/templates/image-cleaner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if .Values.jupyterhub.enabled }}
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.imageCleaner.image) }}
imagePullSecrets: {{ . }}
{{- end }}
{{- end }}
tolerations:
- effect: NoSchedule
key: hub.jupyter.org/dedicated
Expand Down
2 changes: 2 additions & 0 deletions helm-chart/binderhub/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ stringData:
{{- /* key=filename: value=content */}}
{{- (.Files.Glob "files/*").AsConfig | nindent 2 }}

{{- if .Values.jupyterhub.enabled }}
{{- with include "jupyterhub.extraFiles.stringData" .Values.extraFiles }}
{{- . | nindent 2 }}
{{- end }}
Expand All @@ -30,6 +31,7 @@ stringData:
data:
{{- . | nindent 2 }}
{{- end }}
{{- end }}
---
{{- if or .Values.config.BinderHub.use_registry .Values.config.BinderHub.buildDockerConfig }}
kind: Secret
Expand Down

0 comments on commit 5b298e0

Please sign in to comment.