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

Fix failure to set imagePullSecrets for user-placeholder pods (scheduling.userPlaceholder.image config added) #2293

Merged
merged 2 commits into from
Jun 29, 2021
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
1 change: 1 addition & 0 deletions jupyterhub/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2181,6 +2181,7 @@ properties:
properties:
enabled:
type: boolean
image: *image-spec
replicas:
type: integer
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,22 @@ spec:
{{- end }}
terminationGracePeriodSeconds: 0
automountServiceAccountToken: false
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.scheduling.userPlaceholder.image) }}
imagePullSecrets: {{ . }}
{{- end }}
containers:
- name: pause
image: {{ .Values.prePuller.pause.image.name }}:{{ .Values.prePuller.pause.image.tag }}
image: {{ .Values.scheduling.userPlaceholder.image.name }}:{{ .Values.scheduling.userPlaceholder.image.tag }}
{{- if .Values.scheduling.userPlaceholder.resources }}
resources:
{{- .Values.scheduling.userPlaceholder.resources | toYaml | trimSuffix "\n" | nindent 12 }}
{{- else if (include "jupyterhub.singleuser.resources" .) }}
resources:
{{- include "jupyterhub.singleuser.resources" . | nindent 12 }}
{{- end }}
{{- with .Values.scheduling.userPlaceholder.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- with .Values.scheduling.userPlaceholder.containerSecurityContext }}
securityContext:
{{- . | toYaml | trimSuffix "\n" | nindent 12 }}
Expand Down
5 changes: 5 additions & 0 deletions jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ scheduling:
userPlaceholderPriority: -10
userPlaceholder:
enabled: true
image:
name: k8s.gcr.io/pause
tag: "3.2" # https://console.cloud.google.com/gcr/images/google-containers/GLOBAL/pause?gcrImageListsize=30
pullPolicy:
pullSecrets: []
replicas: 0
containerSecurityContext:
runAsUser: 65534 # nobody user
Expand Down
7 changes: 3 additions & 4 deletions tools/templates/lint-and-validate-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ hub:
subPath: /mock
storageClassName: custom-storage-class
url: custom-db-url
image:
image: &image
name: dummy-name
tag: dummy-tag
pullPolicy: Always
pullSecrets: [c]
initContainers:
- name: mock-init-container-name
Expand Down Expand Up @@ -384,9 +385,7 @@ scheduling:
enabled: true
replicas: 1
logLevel: 10
image:
name: gcr.io/google_containers/kube-scheduler-amd64
tag: v1.11.2
image: *image
nodeSelector:
node-type: mock
tolerations:
Expand Down