Skip to content
Snippets Groups Projects

bulk-load 2/2, previous mr feedbacks + preparation for prod execution

Merged Vincent Sellier requested to merge bulk-load into staging
6 files
+ 46
17
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -2,7 +2,8 @@
{{ $schedulerConfigRef := required "toolbox.bulkLoad.schedulerConfigurationRef is mandatory" .Values.toolbox.bulkLoad.schedulerConfigurationRef }}
{{ $schedulerConfig := required (print $schedulerConfigRef "not found in toolbox configs") (get .Values.toolbox.configs $schedulerConfigRef) }}
{{- range $job, $job_config := .Values.toolbox.bulkLoad.jobs -}}
{{- $name := ( print "bulk-load-" $job ) }}
{{- $queuePrefix := required (print "queuePrefix is mandatory for bulk load job " $job) $job_config.queuePrefix -}}
{{- $name := ( print "bulk-load-" $queuePrefix "-" $job ) }}
---
apiVersion: batch/v1
kind: Job
@@ -28,17 +29,17 @@ spec:
{{ end }}
initContainers:
- name: prepare-configuration-scheduler
image: debian:bullseye
image: {{ $.Values.swh_utils_image }}:{{ $job_config.swhUtilsImageVersion | default $.Values.swh_utils_image_version }}
imagePullPolicy: IfNotPresent
command:
- /bin/bash
args:
- -c
- eval echo "\"$(</etc/swh/configuration-template/config.yml.template)\"" > /etc/swh/config-scheduler.yml
- /entrypoints/prepare-configuration.sh
env: {{ include "swh.secrets.envFromDeploymentConfig"
(dict "deploymentConfig" $schedulerConfig
"Values" $.Values) | nindent 10 }}
volumeMounts:
- name: config-utils
mountPath: /entrypoints
readOnly: true
- name: configuration
mountPath: /etc/swh
- name: configuration-template
@@ -62,13 +63,15 @@ spec:
{{- end }}
env:
- name: SWH_CONFIG_FILENAME
value: /etc/swh/config-scheduler.yml
value: /etc/swh/config.yml
- name: ORIGINS
value: {{ $job }}.lst
- name: ORIGINS_URL
value: {{ required (print "bulkLoad origins list url (originListUrl) is mandatory for " $job) $job_config.originListUrl }}
- name: TASK_TYPE
value: {{ required (print "bulkLoad taskType is mandatory for " $job) $job_config.taskType }}
- name: QUEUE_PREFIX
value: {{ $queuePrefix }}
- name: MAX_TASKS
value: {{ $job_config.maxTasks | default 1000 | quote }}
command:
@@ -96,8 +99,6 @@ spec:
configMap:
name: toolbox-script-utils
defaultMode: 0555
{{ end }}
{{- end }}
Loading