From eda37a9537adbd69d01f0b84e54ab9a739e35a9c Mon Sep 17 00:00:00 2001 From: Slim <46485341+slim0@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:06:56 +0200 Subject: [PATCH] A Kubernetes PriorityClassName can be set for onyxia web and api (#610) * A Kubernetes PriorityClassName can be set for onyxia web and api --------- Co-authored-by: slyobard --- helm-chart/Chart.yaml | 2 +- helm-chart/templates/deployment-api.yaml | 3 +++ helm-chart/templates/deployment-web.yaml | 3 +++ helm-chart/values.yaml | 12 ++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index ca2d524d7..a22a16807 100644 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -14,4 +14,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 4.2.0 +version: 4.2.1 diff --git a/helm-chart/templates/deployment-api.yaml b/helm-chart/templates/deployment-api.yaml index da207be44..ff623960f 100644 --- a/helm-chart/templates/deployment-api.yaml +++ b/helm-chart/templates/deployment-api.yaml @@ -71,3 +71,6 @@ spec: {{- if .Values.api.extraVolumes }} volumes: {{- toYaml .Values.api.extraVolumes | nindent 6 }} {{- end }} + {{- if .Values.api.priorityClassName }} + priorityClassName: "{{ .Values.api.priorityClassName }}" + {{- end }} diff --git a/helm-chart/templates/deployment-web.yaml b/helm-chart/templates/deployment-web.yaml index 261190cfd..313f781d9 100644 --- a/helm-chart/templates/deployment-web.yaml +++ b/helm-chart/templates/deployment-web.yaml @@ -69,3 +69,6 @@ spec: {{- if .Values.web.extraVolumes }} volumes: {{- toYaml .Values.web.extraVolumes | nindent 6 }} {{- end }} + {{- if .Values.web.priorityClassName }} + priorityClassName: "{{ .Values.web.priorityClassName }}" + {{- end }} diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index bb144ea4b..413935fcb 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -50,6 +50,12 @@ web: repository: inseefrlab/onyxia-web tag: 2.29.7 pullPolicy: IfNotPresent + + ## Pod priority settings + ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ + ## + priorityClassName: "" + podLabels: {} podSecurityContext: {} # fsGroup: 2000 securityContext: @@ -92,6 +98,12 @@ api: tag: v0.31 pullPolicy: IfNotPresent contextPath: /api + + ## Pod priority settings + ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ + ## + priorityClassName: "" + podLabels: {} podSecurityContext: {} # fsGroup: 2000 securityContext: