From 5d8ec1083afa8659c9dd91bf7f0ce3f5aea174d4 Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 19 Sep 2024 16:35:27 +0200 Subject: [PATCH] fix: Nextflow pod spec can now alter imagePullPolicy --- roles/player/defaults/main.yaml | 1 + roles/player/templates/configmap-nextflow-config.yaml.j2 | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/player/defaults/main.yaml b/roles/player/defaults/main.yaml index 44edac1..f99b5f8 100644 --- a/roles/player/defaults/main.yaml +++ b/roles/player/defaults/main.yaml @@ -32,6 +32,7 @@ fp_parameter_file: parameters.yaml fp_image_registry: '' fp_image_name: informaticsmatters/fragmentor-player fp_image_tag: '1.2.0' +fp_image_pull_policy: 'IfNotPresent' # The nextflow version to run. # The player image generally contains the 'latest' nextflow version. diff --git a/roles/player/templates/configmap-nextflow-config.yaml.j2 b/roles/player/templates/configmap-nextflow-config.yaml.j2 index 1c08432..a196c83 100644 --- a/roles/player/templates/configmap-nextflow-config.yaml.j2 +++ b/roles/player/templates/configmap-nextflow-config.yaml.j2 @@ -11,11 +11,13 @@ metadata: data: config: | process { + pod = [ + nodeSelector: 'informaticsmatters.com/purpose-fragmentor=yes', {% if all_image_preset_pullsecret_name|string|length > 0 %} - pod = [nodeSelector: 'informaticsmatters.com/purpose-fragmentor=yes', imagePullSecret: '{{ all_image_preset_pullsecret_name }}'] -{% else %} - pod = [nodeSelector: 'informaticsmatters.com/purpose-fragmentor=yes'] + imagePullSecret: '{{ all_image_preset_pullsecret_name }}', {% endif %} + imagePullPolicy: '{{ fp_image_pull_policy }}' + ] } executor { name = 'k8s'