Skip to content

Commit

Permalink
Added the ability to use an existing/shared imge pull secret
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Oct 3, 2019
1 parent 83f7764 commit 262ac38
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 8 additions & 2 deletions jupyterhub/templates/hub/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ spec:
{{- end }}
securityContext:
fsGroup: {{ .Values.hub.fsGid }}
{{- if .Values.hub.imagePullSecret.enabled }}
{{- if or .Values.hub.imagePullSecret.enabled .Values.hub.image.pullSecrets }}
imagePullSecrets:
{{- if .Values.hub.imagePullSecret.enabled }}
- name: hub-image-credentials
{{- end }}
{{ else }}
{{- range .Values.hub.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.hub.initContainers }}
initContainers:
{{- .Values.hub.initContainers | toYaml | trimSuffix "\n" | nindent 8 }}
Expand Down
8 changes: 7 additions & 1 deletion jupyterhub/templates/image-puller/_daemonset-helper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,15 @@ spec:
{{- end }}
terminationGracePeriodSeconds: 0
automountServiceAccountToken: false
{{- if .Values.singleuser.imagePullSecret.enabled }}
{{- if or .Values.singleuser.imagePullSecret.enabled .Values.singleuser.image.pullSecrets }}
imagePullSecrets:
{{- if .Values.singleuser.imagePullSecret.enabled }}
- name: {{ if .hook -}} hook- {{- end -}} singleuser-image-credentials
{{ else }}
{{- range .Values.singleuser.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{ end }}
{{- end }}
initContainers:
- name: image-pull-singleuser
Expand Down
4 changes: 4 additions & 0 deletions jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ hub:
image:
name: jupyterhub/k8s-hub
tag: generated-by-chartpress
# pullSecrets:
# - secretName
resources:
requests:
cpu: 200m
Expand Down Expand Up @@ -245,6 +247,8 @@ singleuser:
name: jupyterhub/k8s-singleuser-sample
tag: generated-by-chartpress
pullPolicy: IfNotPresent
# pullSecrets:
# - secretName
imagePullSecret:
enabled: false
registry:
Expand Down

0 comments on commit 262ac38

Please sign in to comment.