Skip to content

Commit dd66b3c

Browse files
committed
feat: Address review
1 parent aecfcf0 commit dd66b3c

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

jupyterhub/templates/_helpers-names.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,15 @@
201201
{{- include "jupyterhub.fullname.dash" . }}continuous-image-puller
202202
{{- end }}
203203

204+
{{- /* continuous-image-puller ServiceAccount */}}
205+
{{- define "jupyterhub.continuous-image-puller-serviceaccount.fullname" -}}
206+
{{- if .Values.prePuller.continuous.serviceAccount.create }}
207+
{{- .Values.prePuller.continuous.serviceAccount.name | default (include "jupyterhub.continuous-image-puller.fullname" .) }}
208+
{{- else }}
209+
{{- .Values.prePuller.continuous.serviceAccount.name | default "default" }}
210+
{{- end }}
211+
{{- end }}
212+
204213
{{- /* singleuser NetworkPolicy */}}
205214
{{- define "jupyterhub.singleuser.fullname" -}}
206215
{{- include "jupyterhub.fullname.dash" . }}singleuser

jupyterhub/templates/image-puller/_helpers-daemonset.tpl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ spec:
7171
{{- end }}
7272
terminationGracePeriodSeconds: 0
7373
{{- if .hook }}
74-
serviceAccountName: "hook-image-puller-serviceaccount"
74+
{{- with include "jupyterhub.hook-image-awaiter-serviceaccount.fullname" . }}
75+
serviceAccountName: {{ . }}
76+
{{- end }}
7577
{{- else }}
76-
serviceAccountName: "continuous-image-puller-serviceaccount"
78+
{{- with include "jupyterhub.continuous-image-puller-serviceaccount.fullname" . }}
79+
serviceAccountName: {{ . }}
80+
{{- end }}
7781
{{- end }}
7882
automountServiceAccountToken: false
7983
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.singleuser.image) }}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- /*
2-
ServiceAccount for the continuous hook's
2+
ServiceAccount for the continuous image-puller
33
*/}}
44
{{- if .Values.prePuller.hook.serviceAccount.create -}}
55
{{- if .Values.prePuller.continuous.enabled -}}
@@ -9,8 +9,5 @@ metadata:
99
name: "continuous-image-puller-serviceaccount"
1010
labels:
1111
{{- include "jupyterhub.labels" . | nindent 4 }}
12-
annotations:
13-
"helm.sh/hook": pre-install,pre-upgrade
14-
"helm.sh/hook-weight": "0"
1512
{{- end }}
1613
{{- end }}

jupyterhub/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,10 @@ prePuller:
671671
annotations: {}
672672
continuous:
673673
enabled: true
674+
serviceAccount:
675+
create: true
676+
name:
677+
annotations: {}
674678
pullProfileListImages: true
675679
extraImages: {}
676680
pause:

0 commit comments

Comments
 (0)