2323 component : binder
2424 release : {{ .Release.Name }}
2525 heritage : {{ .Release.Service }}
26- {{ if .Values.deployment.labels - }}
26+ {{- with .Values.deployment.labels }}
2727 # Because toYaml + indent is super flaky
28- {{ range $key, $value := .Values.deployment.labels - }}
28+ {{- range $key, $value := .Values.deployment.labels }}
2929 {{ $key }}: {{ $value | quote }}
3030 {{- end }}
3131 {{- end }}
@@ -34,11 +34,11 @@ spec:
3434 checksum/config-map : {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
3535 checksum/secret : {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
3636 spec :
37- {{ if .Values.initContainers - }}
37+ {{- with .Values.initContainers }}
3838 initContainers :
39- {{ toYaml .Values.initContainers | indent 6 }}
39+ {{- . | toYaml | nindent 8 }}
4040 {{- end }}
41- nodeSelector : {{ toJson .Values.nodeSelector }}
41+ nodeSelector : {{ .Values.nodeSelector | toJson }}
4242 {{- if .Values.rbac.enabled }}
4343 serviceAccountName : binderhub
4444 {{- end }}
@@ -49,18 +49,18 @@ spec:
4949 - name : secret-config
5050 secret :
5151 secretName : binder-secret
52- {{ if .Values.config.BinderHub.use_registry - }}
52+ {{- if .Values.config.BinderHub.use_registry }}
5353 - name : docker-secret
5454 secret :
5555 secretName : binder-push-secret
56- {{ else - }}
56+ {{- else }}
5757 - name : docker-socket
5858 hostPath :
5959 path : /var/run/docker.sock
6060 {{- end }}
61- {{ if .Values.extraVolumes }}
62- {{ toYaml .Values.extraVolumes | indent 6 }}
63- {{ end }}
61+ {{- with .Values.extraVolumes }}
62+ {{- . | toYaml | nindent 6 }}
63+ {{- end }}
6464 containers :
6565 - name : binder
6666 image : {{ .Values.image.name }}:{{ .Values.image.tag }}
@@ -72,19 +72,19 @@ spec:
7272 name : config
7373 - mountPath : /etc/binderhub/secret/
7474 name : secret-config
75- {{ if .Values.config.BinderHub.use_registry - }}
75+ {{- if .Values.config.BinderHub.use_registry }}
7676 - mountPath : /root/.docker
7777 name : docker-secret
7878 readOnly : true
79- {{ else - }}
79+ {{- else }}
8080 - mountPath : /var/run/docker.sock
8181 name : docker-socket
8282 {{- end }}
83- {{ if .Values.extraVolumeMounts }}
84- {{ toYaml .Values.extraVolumeMounts | indent 10 }}
85- {{ end }}
83+ {{- with .Values.extraVolumeMounts }}
84+ {{- . | toYaml | nindent 10 }}
85+ {{- end }}
8686 resources :
87- {{ toYaml .Values.resources | indent 12 }}
87+ {{- .Values.resources | toYaml | nindent 10 }}
8888 imagePullPolicy : IfNotPresent
8989 env :
9090 - name : BUILD_NAMESPACE
@@ -102,25 +102,25 @@ spec:
102102 - name : JUPYTERHUB_BASE_URL
103103 value : {{ .Values.jupyterhub.hub.baseUrl | quote }}
104104 - name : JUPYTERHUB_CLIENT_ID
105- value : {{ .Values.jupyterhub.hub.services.binder.oauth_client_id | quote}}
105+ value : {{ .Values.jupyterhub.hub.services.binder.oauth_client_id | quote }}
106106 - name : JUPYTERHUB_OAUTH_CALLBACK_URL
107- value : {{ .Values.jupyterhub.hub.services.binder.oauth_redirect_uri | quote}}
107+ value : {{ .Values.jupyterhub.hub.services.binder.oauth_redirect_uri | quote }}
108108 {{- if .Values.jupyterhub.hub.allowNamedServers }}
109109 - name : JUPYTERHUB_ALLOW_NAMED_SERVERS
110110 value : " true"
111111 - name : JUPYTERHUB_NAMED_SERVER_LIMIT_PER_USER
112- value : {{ .Values.jupyterhub.hub.namedServerLimitPerUser | quote }}
112+ value : {{ .Values.jupyterhub.hub.namedServerLimitPerUser | quote }}
113+ {{- end }}
113114 {{- end }}
115+ {{- with .Values.extraEnv }}
116+ {{- . | toYaml | indent 8 }}
114117 {{- end }}
115- {{ if .Values.extraEnv }}
116- {{ toYaml .Values.extraEnv | indent 8 }}
117- {{ end }}
118118 ports :
119119 - containerPort : 8585
120120 name : binder
121121 livenessProbe :
122122 httpGet :
123- path : {{ default "/" .Values.config.BinderHub.base_url }}versions
123+ path : {{ .Values.config.BinderHub.base_url | default "/" }}versions
124124 port : binder
125125 initialDelaySeconds : 10
126126 periodSeconds : 5
0 commit comments