Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ...image.pull[Policy|Secrets] consistently and hook into JupyterHub's chart wide configuration for imagePullSecrets #1444

Merged
merged 2 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions helm-chart/binderhub/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ spec:
{{- . | toYaml | nindent 8 }}
{{- end }}
spec:
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.image) }}
imagePullSecrets: {{ . }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{- . | toYaml | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions helm-chart/binderhub/templates/dind/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.dind.daemonset.image) }}
imagePullSecrets: {{ . }}
{{- end }}
tolerations:
- effect: NoSchedule
key: hub.jupyter.org/dedicated
Expand All @@ -35,6 +38,9 @@ spec:
containers:
- name: dind
image: {{ .Values.dind.daemonset.image.name }}:{{ .Values.dind.daemonset.image.tag }}
{{- with .Values.dind.daemonset.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
resources:
{{- .Values.dind.resources | toYaml | nindent 10 }}
args:
Expand Down
6 changes: 6 additions & 0 deletions helm-chart/binderhub/templates/image-cleaner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.imageCleaner.image) }}
imagePullSecrets: {{ . }}
{{- end }}
tolerations:
- effect: NoSchedule
key: hub.jupyter.org/dedicated
Expand All @@ -37,6 +40,9 @@ spec:
{{- if or (and (eq $kind "dind") $Values.dind.enabled) (and (eq $kind "host") $Values.imageCleaner.host.enabled) }}
- name: image-cleaner-{{ $kind }}
image: {{ $Values.imageCleaner.image.name }}:{{ $Values.imageCleaner.image.tag }}
{{- with $Values.imageCleaner.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
volumeMounts:
- name: dockerlib-{{ $kind }}
mountPath: /var/lib/docker
Expand Down
6 changes: 6 additions & 0 deletions helm-chart/binderhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ nodeSelector: {}
image:
name: jupyterhub/k8s-binderhub
tag: "set-by-chartpress"
pullPolicy: ""
pullSecrets: []

# registry here is only used to create docker config.json
registry:
Expand Down Expand Up @@ -252,6 +254,8 @@ dind:
image:
name: docker
tag: 20.10.12-dind
pullPolicy: ""
pullSecrets: []
# Additional command line arguments to pass to dockerd
extraArgs: []
lifecycle: {}
Expand All @@ -267,6 +271,8 @@ imageCleaner:
image:
name: quay.io/jupyterhub/docker-image-cleaner
tag: 1.0.0-beta.2
pullPolicy: ""
pullSecrets: []
# delete an image at most every 5 seconds
delay: 5
# Interpret threshold values as percentage or bytes
Expand Down