blob: 5b09cc23c674a80195a2d1880201b81e6651003e [file] [log] [blame]
From b8a903ea2dc9d7d19c65e41b8f8ee8f782428f28 Mon Sep 17 00:00:00 2001
From: Dong Ma <dong.ma@vexxhost.com>
Date: Wed, 12 Feb 2025 04:24:30 +0000
Subject: [PATCH] Enable {priority,runtime}ClassName for Staffeln
---
.../helm-toolkit/templates/manifests/_job-db-sync.tpl | 6 ++++++
.../staffeln/templates/deployment-api.yaml | 6 ++++++
.../staffeln/templates/deployment-conductor.yaml | 6 ++++++
.../staffeln/values.yaml | 8 ++++++++
4 files changed, 26 insertions(+)
diff --git a/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl b/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl
index 24d2496d..ae85b7ef 100644
--- a/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl
+++ b/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl
@@ -67,6 +67,12 @@ spec:
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
spec:
+{{- if and $envAll.Values.pod.priorityClassName $envAll.Values.pod.priorityClassName.db_sync }}
+ priorityClassName: {{ $envAll.Values.pod.priorityClassName.db_sync }}
+{{- end }}
+{{- if and $envAll.Values.pod.runtimeClassName $envAll.Values.pod.runtimeClassName.db_sync }}
+ runtimeClassName: {{ $envAll.Values.pod.runtimeClassName.db_sync }}
+{{- end }}
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure
{{ tuple $envAll "db_sync" | include "helm-toolkit.snippets.kubernetes_image_pull_secrets" | indent 6 }}
diff --git a/staffeln/templates/deployment-api.yaml b/staffeln/templates/deployment-api.yaml
index 577a0620..e61236c9 100644
--- a/staffeln/templates/deployment-api.yaml
+++ b/staffeln/templates/deployment-api.yaml
@@ -46,6 +46,12 @@ spec:
{{ dict "envAll" $envAll "podName" "staffeln-api" "containerNames" (list "init" "staffeln-api") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "staffeln" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
+{{ with .Values.pod.priorityClassName.staffeln_api }}
+ priorityClassName: {{ . }}
+{{ end }}
+{{ with .Values.pod.runtimeClassName.staffeln_api }}
+ runtimeClassName: {{ . }}
+{{ end }}
serviceAccountName: {{ $serviceAccountName }}
affinity:
{{ tuple $envAll "staffeln" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
diff --git a/staffeln/templates/deployment-conductor.yaml b/staffeln/templates/deployment-conductor.yaml
index cf0ad779..a88b97fb 100644
--- a/staffeln/templates/deployment-conductor.yaml
+++ b/staffeln/templates/deployment-conductor.yaml
@@ -79,6 +79,12 @@ spec:
{{ dict "envAll" $envAll "podName" "staffeln-conductor" "containerNames" (list "init" "staffeln-conductor") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
{{ dict "envAll" $envAll "application" "staffeln" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
+{{ with .Values.pod.priorityClassName.staffeln_conductor }}
+ priorityClassName: {{ . }}
+{{ end }}
+{{ with .Values.pod.runtimeClassName.staffeln_conductor }}
+ runtimeClassName: {{ . }}
+{{ end }}
serviceAccountName: {{ $serviceAccountName }}
affinity:
{{ tuple $envAll "staffeln" "conductor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
diff --git a/staffeln/values.yaml b/staffeln/values.yaml
index d7051158..a1a3e292 100644
--- a/staffeln/values.yaml
+++ b/staffeln/values.yaml
@@ -54,6 +54,14 @@ images:
- image_repo_sync
pod:
+ priorityClassName:
+ staffeln_api: null
+ staffeln_conductor: null
+ db_sync: null
+ runtimeClassName:
+ staffeln_api: null
+ staffeln_conductor: null
+ db_sync: null
security_context:
staffeln:
pod:
--
2.34.1