diff --git a/charts/retool/Chart.yaml b/charts/retool/Chart.yaml index e1d810d..046764c 100644 --- a/charts/retool/Chart.yaml +++ b/charts/retool/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: retool description: A Helm chart for Kubernetes type: application -version: 6.6.0 +version: 6.6.1 maintainers: - name: Retool Engineering email: engineering+helm@retool.com diff --git a/charts/retool/templates/deployment_backend.yaml b/charts/retool/templates/deployment_backend.yaml index cfa8450..24d86b3 100644 --- a/charts/retool/templates/deployment_backend.yaml +++ b/charts/retool/templates/deployment_backend.yaml @@ -46,7 +46,9 @@ spec: spec: serviceAccountName: {{ template "retool.serviceAccountName" . }} {{- if .Values.priorityClassName }} - priorityClassName: "{{ .Values.priorityClassName }}" + priorityClassName: {{ .Values.priorityClassName | quote }} + {{- else }} + priorityClassName: {{ printf "%s-backend-priority" (include "retool.fullname" .) | quote }} {{- end }} {{- with .Values.hostAliases }} hostAliases: diff --git a/charts/retool/templates/deployment_jobs.yaml b/charts/retool/templates/deployment_jobs.yaml index 0859dec..37a5370 100644 --- a/charts/retool/templates/deployment_jobs.yaml +++ b/charts/retool/templates/deployment_jobs.yaml @@ -45,7 +45,9 @@ spec: spec: serviceAccountName: {{ template "retool.serviceAccountName" . }} {{- if .Values.priorityClassName }} - priorityClassName: "{{ .Values.priorityClassName }}" + priorityClassName: {{ .Values.priorityClassName | quote }} + {{- else }} + priorityClassName: {{ printf "%s-jobs-runner-priority" (include "retool.fullname" .) | quote }} {{- end }} {{- if .Values.initContainers }} initContainers: diff --git a/charts/retool/templates/priorityclass.yaml b/charts/retool/templates/priorityclass.yaml new file mode 100644 index 0000000..3df29c9 --- /dev/null +++ b/charts/retool/templates/priorityclass.yaml @@ -0,0 +1,27 @@ +{{/* We ensure that the jobs runner has highest priority, +since unrun db migrations can lead to pod crashloops. */}} +{{- if not .Values.priorityClassName }} +{{- if include "retool.jobRunner.enabled" . }} +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: {{ include "retool.fullname" . }}-jobs-runner-priority + labels: + {{- include "retool.labels" . | nindent 4 }} +value: 20 +preemptionPolicy: Never +globalDefault: false +description: "PriorityClass for Retool jobs-runner pods" +--- +{{- end }} +apiVersion: scheduling.k8s.io/v1 +kind: PriorityClass +metadata: + name: {{ include "retool.fullname" . }}-backend-priority + labels: + {{- include "retool.labels" . | nindent 4 }} +value: 10 +preemptionPolicy: Never +globalDefault: false +description: "PriorityClass for Retool backend pods" +{{- end }}