diff --git a/helm-chart/binderhub/templates/deployment.yaml b/helm-chart/binderhub/templates/deployment.yaml index 42237df36..6156e210f 100644 --- a/helm-chart/binderhub/templates/deployment.yaml +++ b/helm-chart/binderhub/templates/deployment.yaml @@ -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 }} @@ -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 @@ -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 diff --git a/helm-chart/binderhub/templates/image-cleaner.yaml b/helm-chart/binderhub/templates/image-cleaner.yaml index d51430e88..edf5faa05 100644 --- a/helm-chart/binderhub/templates/image-cleaner.yaml +++ b/helm-chart/binderhub/templates/image-cleaner.yaml @@ -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 diff --git a/helm-chart/binderhub/templates/secret.yaml b/helm-chart/binderhub/templates/secret.yaml index e6ee24d5c..fae7e64bf 100644 --- a/helm-chart/binderhub/templates/secret.yaml +++ b/helm-chart/binderhub/templates/secret.yaml @@ -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 }} @@ -30,6 +31,7 @@ stringData: data: {{- . | nindent 2 }} {{- end }} +{{- end }} --- {{- if or .Values.config.BinderHub.use_registry .Values.config.BinderHub.buildDockerConfig }} kind: Secret