diff --git a/kubernetes/loculus/templates/_possiblePriorityClassName.tpl b/kubernetes/loculus/templates/_possiblePriorityClassName.tpl new file mode 100644 index 000000000..3b8b29e30 --- /dev/null +++ b/kubernetes/loculus/templates/_possiblePriorityClassName.tpl @@ -0,0 +1,5 @@ +{{- define "possiblePriorityClassName" -}} +{{- if .Values.podPriorityClassName }} +priorityClassName: {{ .Values.podPriorityClassName }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/loculus/templates/ena-submission-deployment.yaml b/kubernetes/loculus/templates/ena-submission-deployment.yaml index 8a05108c4..6f0d3ac20 100644 --- a/kubernetes/loculus/templates/ena-submission-deployment.yaml +++ b/kubernetes/loculus/templates/ena-submission-deployment.yaml @@ -20,6 +20,7 @@ spec: app: loculus component: loculus-ena-submission spec: + {{- include "possiblePriorityClassName" . | nindent 6 }} initContainers: - name: ena-submission-flyway image: "ghcr.io/loculus-project/ena-submission-flyway:{{ $dockerTag }}" diff --git a/kubernetes/loculus/templates/ingest-deployment.yaml b/kubernetes/loculus/templates/ingest-deployment.yaml index 8d49d2a88..48be4bdbc 100644 --- a/kubernetes/loculus/templates/ingest-deployment.yaml +++ b/kubernetes/loculus/templates/ingest-deployment.yaml @@ -23,6 +23,7 @@ spec: annotations: argocd.argoproj.io/sync-options: Force=true,Replace=true spec: + {{- include "possiblePriorityClassName" $ | nindent 6 }} containers: - name: ingest-{{ $key }} image: {{ $value.ingest.image}}:{{ $dockerTag }} diff --git a/kubernetes/loculus/templates/keycloak-deployment.yaml b/kubernetes/loculus/templates/keycloak-deployment.yaml index b71e39f11..b2b875dfe 100644 --- a/kubernetes/loculus/templates/keycloak-deployment.yaml +++ b/kubernetes/loculus/templates/keycloak-deployment.yaml @@ -29,6 +29,7 @@ spec: app: loculus component: keycloak spec: + {{- include "possiblePriorityClassName" . | nindent 6 }} initContainers: {{- include "loculus.configProcessor" (dict "name" "keycloak-config" "dockerTag" $dockerTag) | nindent 8 }} - name: keycloak-theme-prep diff --git a/kubernetes/loculus/templates/lapis-silo-deployment.yaml b/kubernetes/loculus/templates/lapis-silo-deployment.yaml index d75b96b3c..bedd9e819 100644 --- a/kubernetes/loculus/templates/lapis-silo-deployment.yaml +++ b/kubernetes/loculus/templates/lapis-silo-deployment.yaml @@ -22,6 +22,7 @@ spec: app: loculus component: lapis-silo-{{ $key }} spec: + {{- include "possiblePriorityClassName" $ | nindent 6 }} initContainers: {{- include "loculus.configProcessor" (dict "name" "lapis-silo-database-config" "dockerTag" $dockerTag) | nindent 8 }} containers: diff --git a/kubernetes/loculus/templates/loculus-backend.yaml b/kubernetes/loculus/templates/loculus-backend.yaml index 9ed03e288..051c1a6fb 100644 --- a/kubernetes/loculus/templates/loculus-backend.yaml +++ b/kubernetes/loculus/templates/loculus-backend.yaml @@ -20,6 +20,7 @@ spec: app: loculus component: backend spec: + {{- include "possiblePriorityClassName" . | nindent 6 }} initContainers: {{- include "loculus.configProcessor" (dict "name" "loculus-backend-config" "dockerTag" $dockerTag) | nindent 8 }} containers: diff --git a/kubernetes/loculus/templates/loculus-preprocessing-deployment.yaml b/kubernetes/loculus/templates/loculus-preprocessing-deployment.yaml index 0beb071c1..a0377c804 100644 --- a/kubernetes/loculus/templates/loculus-preprocessing-deployment.yaml +++ b/kubernetes/loculus/templates/loculus-preprocessing-deployment.yaml @@ -30,6 +30,7 @@ spec: app: loculus component: loculus-preprocessing-{{ $organism }}-v{{ $processingConfig.version }}-{{ $processingIndex }} spec: + {{- include "possiblePriorityClassName" $ | nindent 6 }} containers: - name: preprocessing-{{ $organism }} image: {{ $processingConfig.image}}:{{ $dockerTag }} diff --git a/kubernetes/loculus/templates/loculus-website.yaml b/kubernetes/loculus/templates/loculus-website.yaml index a36173b36..987382499 100644 --- a/kubernetes/loculus/templates/loculus-website.yaml +++ b/kubernetes/loculus/templates/loculus-website.yaml @@ -20,6 +20,7 @@ spec: app: loculus component: website spec: + {{- include "possiblePriorityClassName" . | nindent 6 }} initContainers: {{- include "loculus.configProcessor" (dict "name" "loculus-website-config" "dockerTag" $dockerTag) | nindent 8 }} containers: