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

Parameterize the image used for init containers. #500

Merged
merged 1 commit into from
Sep 9, 2024
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
12 changes: 8 additions & 4 deletions galaxy/templates/jobs-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ spec:
restartPolicy: OnFailure
initContainers:
- name: {{ .Chart.Name }}-wait-postgres
image: alpine:3.16
image: {{ .Values.jobs.init.image.repository }}:{{ .Values.jobs.init.image.tag }}
imagePullPolicy: {{ .Values.jobs.init.image.pullPolicy }}
command: ['sh', '-c', 'echo Chown mount path; chown 101:101 {{ .Values.persistence.mountPath }}; echo Begin waiting for postgres; until nc -z -w3 {{ template "galaxy-postgresql.fullname" . }} 5432; do echo waiting for galaxy-postgres service; sleep 1; done; echo done;']
volumeMounts:
- name: galaxy-data
Expand Down Expand Up @@ -198,7 +199,8 @@ spec:
{{- end }}
{{ if .Values.setupJob.downloadToolConfs.enabled }}
- name: {{ .Chart.Name }}-init-cloud-repo
image: alpine:3.16
image: {{ .Values.jobs.init.image.repository }}:{{ .Values.jobs.init.image.tag }}
imagePullPolicy: {{ .Values.jobs.init.image.pullPolicy }}
command: ['sh', '-c', '{{- include "galaxy.extract-archive-if-changed-command" (dict "extractPath" .Values.setupJob.downloadToolConfs.volume.mountPath "downloadUrl" .Values.setupJob.downloadToolConfs.archives.startup) -}} && echo "Done" > /galaxy/server/config/mutable/init_clone_done_{{.Release.Revision}}']
volumeMounts:
- name: galaxy-data
Expand All @@ -208,14 +210,16 @@ spec:
mountPath: /galaxy/server/config/mutable/
subPath: config
- name: {{ .Chart.Name }}-init-cloud-repo-partial
image: alpine:3.16
image: {{ .Values.jobs.init.image.repository }}:{{ .Values.jobs.init.image.tag }}
imagePullPolicy: {{ .Values.jobs.init.image.pullPolicy }}
command: ['sh', '-c', '{{- include "galaxy.extract-archive-if-changed-command" (dict "extractPath" .Values.setupJob.downloadToolConfs.volume.mountPath "downloadUrl" .Values.setupJob.downloadToolConfs.archives.running) -}}']
volumeMounts:
- name: galaxy-data
mountPath: {{ .Values.setupJob.downloadToolConfs.volume.mountPath }}
subPath: {{ .Values.setupJob.downloadToolConfs.volume.subPath }}
- name: {{ .Chart.Name }}-init-cloud-repo-full
image: alpine:3.16
image: {{ .Values.jobs.init.image.repository }}:{{ .Values.jobs.init.image.tag }}
imagePullPolicy: {{ .Values.jobs.init.image.pullPolicy }}
command: ['sh', '-c', '{{- include "galaxy.extract-archive-if-changed-command" (dict "extractPath" .Values.setupJob.downloadToolConfs.volume.mountPath "downloadUrl" .Values.setupJob.downloadToolConfs.archives.full) -}}']
volumeMounts:
- name: galaxy-data
Expand Down
6 changes: 6 additions & 0 deletions galaxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,12 @@ configs:

#- Additional dynamic rules to map into the container.
jobs:
init:
#- The Docker image to use for the init containers
image:
repository: alpine
tag: 3.16
pullPolicy: IfNotPresent
priorityClass:
#- Assign a [priorityClass](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass) to the dispatched jobs.
enabled: true
Expand Down
Loading