Skip to content

Commit d780087

Browse files
committed
feat: Hook image puller
1 parent 8f08d75 commit d780087

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

jupyterhub/templates/_helpers-names.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@
196196
{{- include "jupyterhub.fullname.dash" . }}hook-image-puller
197197
{{- end }}
198198

199+
{{- /* hook-image-puller ServiceAccount */}}
200+
{{- define "jupyterhub.continuous-image-puller-serviceaccount.fullname" -}}
201+
{{- if .Values.prePuller.hook.serviceAccount.create }}
202+
{{- .Values.prePuller.hook.serviceAccount.name | default (include "jupyterhub.hook-image-puller.fullname" .) }}
203+
{{- else }}
204+
{{- .Values.prePuller.hook.serviceAccount.name | default "default" }}
205+
{{- end }}
206+
{{- end }}
207+
199208
{{- /* continuous-image-puller DaemonSet */}}
200209
{{- define "jupyterhub.continuous-image-puller.fullname" -}}
201210
{{- include "jupyterhub.fullname.dash" . }}continuous-image-puller

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ spec:
7171
{{- end }}
7272
terminationGracePeriodSeconds: 0
7373
{{- if .hook }}
74-
serviceAccountName: "hook-image-puller-serviceaccount"
74+
{{- with include "jupyterhub.continuous-image-puller-serviceaccount.fullname" . }}
75+
serviceAccountName: {{ . }}
76+
{{- end }}
7577
{{- else }}
7678
{{- with include "jupyterhub.continuous-image-puller-serviceaccount.fullname" . }}
7779
serviceAccountName: {{ . }}

jupyterhub/templates/image-puller/serviceaccount-hook.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{{- /*
2-
ServiceAccount for the pre-puller hook's
2+
ServiceAccount for the hook image-puller
33
*/}}
44
{{- if .Values.prePuller.hook.serviceAccount.create -}}
55
{{- if (include "jupyterhub.imagePuller.daemonset.hook.install" .) -}}
66
apiVersion: v1
77
kind: ServiceAccount
88
metadata:
9-
name: "hook-image-puller-serviceaccount"
9+
name: {{ include "jupyterhub.hook-image-puller.fullname" . }}
1010
labels:
1111
{{- include "jupyterhub.labels" . | nindent 4 }}
1212
hub.jupyter.org/deletable: "true"

0 commit comments

Comments
 (0)