Skip to content

Commit 5099ba7

Browse files
authored
Merge pull request #1444 from emrahkaya/patch-3
Support `...image.pull[Policy|Secrets]` consistently and hook into JupyterHub's chart wide configuration for imagePullSecrets
2 parents bd957db + d4d7cd8 commit 5099ba7

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

helm-chart/binderhub/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ spec:
3333
{{- . | toYaml | nindent 8 }}
3434
{{- end }}
3535
spec:
36+
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.image) }}
37+
imagePullSecrets: {{ . }}
38+
{{- end }}
3639
{{- with .Values.initContainers }}
3740
initContainers:
3841
{{- . | toYaml | nindent 8 }}

helm-chart/binderhub/templates/dind/daemonset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ spec:
1818
release: {{ .Release.Name }}
1919
heritage: {{ .Release.Service }}
2020
spec:
21+
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.dind.daemonset.image) }}
22+
imagePullSecrets: {{ . }}
23+
{{- end }}
2124
tolerations:
2225
- effect: NoSchedule
2326
key: hub.jupyter.org/dedicated
@@ -35,6 +38,9 @@ spec:
3538
containers:
3639
- name: dind
3740
image: {{ .Values.dind.daemonset.image.name }}:{{ .Values.dind.daemonset.image.tag }}
41+
{{- with .Values.dind.daemonset.image.pullPolicy }}
42+
imagePullPolicy: {{ . }}
43+
{{- end }}
3844
resources:
3945
{{- .Values.dind.resources | toYaml | nindent 10 }}
4046
args:

helm-chart/binderhub/templates/image-cleaner.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ spec:
1919
release: {{ .Release.Name }}
2020
heritage: {{ .Release.Service }}
2121
spec:
22+
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.imageCleaner.image) }}
23+
imagePullSecrets: {{ . }}
24+
{{- end }}
2225
tolerations:
2326
- effect: NoSchedule
2427
key: hub.jupyter.org/dedicated
@@ -37,6 +40,9 @@ spec:
3740
{{- if or (and (eq $kind "dind") $Values.dind.enabled) (and (eq $kind "host") $Values.imageCleaner.host.enabled) }}
3841
- name: image-cleaner-{{ $kind }}
3942
image: {{ $Values.imageCleaner.image.name }}:{{ $Values.imageCleaner.image.tag }}
43+
{{- with $Values.imageCleaner.image.pullPolicy }}
44+
imagePullPolicy: {{ . }}
45+
{{- end }}
4046
volumeMounts:
4147
- name: dockerlib-{{ $kind }}
4248
mountPath: /var/lib/docker

helm-chart/binderhub/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ nodeSelector: {}
1818
image:
1919
name: jupyterhub/k8s-binderhub
2020
tag: "set-by-chartpress"
21+
pullPolicy: ""
22+
pullSecrets: []
2123

2224
# registry here is only used to create docker config.json
2325
registry:
@@ -252,6 +254,8 @@ dind:
252254
image:
253255
name: docker
254256
tag: 20.10.12-dind
257+
pullPolicy: ""
258+
pullSecrets: []
255259
# Additional command line arguments to pass to dockerd
256260
extraArgs: []
257261
lifecycle: {}
@@ -267,6 +271,8 @@ imageCleaner:
267271
image:
268272
name: quay.io/jupyterhub/docker-image-cleaner
269273
tag: 1.0.0-beta.2
274+
pullPolicy: ""
275+
pullSecrets: []
270276
# delete an image at most every 5 seconds
271277
delay: 5
272278
# Interpret threshold values as percentage or bytes

0 commit comments

Comments
 (0)