blob: 7397b0edc53d7d8ef93abc7bb6eea97be93a3346 [file] [log] [blame]
Mohammed Naserefaf37b2025-02-05 16:40:34 -05001From 5fa9fbab45a5cd489007ca0286e7203accd1f398 Mon Sep 17 00:00:00 2001
2From: Mohammed Naser <mnaser@vexxhost.com>
3Date: Thu, 6 Feb 2025 09:33:47 -0500
4Subject: [PATCH] Enable {priority,runtime}ClassName for Cinder
5
6---
7 .../cron-job-cinder-volume-usage-audit.yaml | 6 ++++++
8 cinder/templates/deployment-api.yaml | 6 ++++++
9 cinder/templates/deployment-backup.yaml | 6 ++++++
10 cinder/templates/deployment-scheduler.yaml | 6 ++++++
11 cinder/templates/deployment-volume.yaml | 6 ++++++
12 cinder/templates/pod-rally-test.yaml | 6 ++++++
13 cinder/values.yaml | 16 ++++++++++++++++
14 7 files changed, 52 insertions(+)
15
16diff --git a/cinder/templates/cron-job-cinder-volume-usage-audit.yaml b/cinder/templates/cron-job-cinder-volume-usage-audit.yaml
17index 1d935f12..18d9e28e 100644
18--- a/cinder/templates/cron-job-cinder-volume-usage-audit.yaml
19+++ b/cinder/templates/cron-job-cinder-volume-usage-audit.yaml
20@@ -50,6 +50,12 @@ spec:
21 {{ dict "envAll" $envAll "podName" $serviceAccountName "containerNames" (list "cinder-volume-usage-audit" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 12 }}
22 spec:
23 {{ dict "envAll" $envAll "application" "volume_usage_audit" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 10 }}
24+{{ with .Values.pod.priorityClassName.cinder_api }}
25+ priorityClassName: {{ . }}
26+{{ end }}
27+{{ with .Values.pod.runtimeClassName.cinder_api }}
28+ runtimeClassName: {{ . }}
29+{{ end }}
30 serviceAccountName: {{ $serviceAccountName }}
31 restartPolicy: OnFailure
32 {{ if $envAll.Values.pod.tolerations.cinder.enabled }}
33diff --git a/cinder/templates/deployment-api.yaml b/cinder/templates/deployment-api.yaml
34index f29d103f..3b1a30d6 100644
35--- a/cinder/templates/deployment-api.yaml
36+++ b/cinder/templates/deployment-api.yaml
37@@ -46,6 +46,12 @@ spec:
38 {{ tuple "cinder_api" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
39 {{ dict "envAll" $envAll "podName" "cinder-api" "containerNames" (list "cinder-api" "ceph-coordination-volume-perms" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
40 spec:
41+{{ with .Values.pod.priorityClassName.cinder_api }}
42+ priorityClassName: {{ . }}
43+{{ end }}
44+{{ with .Values.pod.runtimeClassName.cinder_api }}
45+ runtimeClassName: {{ . }}
46+{{ end }}
47 serviceAccountName: {{ $serviceAccountName }}
48 {{ dict "envAll" $envAll "application" "cinder_api" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
49 affinity:
50diff --git a/cinder/templates/deployment-backup.yaml b/cinder/templates/deployment-backup.yaml
51index ccd84fc0..617031a0 100644
52--- a/cinder/templates/deployment-backup.yaml
53+++ b/cinder/templates/deployment-backup.yaml
54@@ -48,6 +48,12 @@ spec:
55 {{ tuple "cinder_backup" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
56 {{ dict "envAll" $envAll "podName" "cinder-backup" "containerNames" (list "cinder-backup" "ceph-coordination-volume-perms" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
57 spec:
58+{{ with .Values.pod.priorityClassName.cinder_backup }}
59+ priorityClassName: {{ . }}
60+{{ end }}
61+{{ with .Values.pod.runtimeClassName.cinder_backup }}
62+ runtimeClassName: {{ . }}
63+{{ end }}
64 serviceAccountName: {{ $serviceAccountName }}
65 {{ dict "envAll" $envAll "application" "cinder_backup" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
66 affinity:
67diff --git a/cinder/templates/deployment-scheduler.yaml b/cinder/templates/deployment-scheduler.yaml
68index 73e14e55..016ade95 100644
69--- a/cinder/templates/deployment-scheduler.yaml
70+++ b/cinder/templates/deployment-scheduler.yaml
71@@ -46,6 +46,12 @@ spec:
72 {{ tuple "cinder_scheduler" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
73 {{ dict "envAll" $envAll "podName" "cinder-scheduler" "containerNames" (list "cinder-scheduler" "ceph-coordination-volume-perms" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
74 spec:
75+{{ with .Values.pod.priorityClassName.cinder_scheduler }}
76+ priorityClassName: {{ . }}
77+{{ end }}
78+{{ with .Values.pod.runtimeClassName.cinder_scheduler }}
79+ runtimeClassName: {{ . }}
80+{{ end }}
81 serviceAccountName: {{ $serviceAccountName }}
82 {{ dict "envAll" $envAll "application" "cinder_scheduler" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
83 affinity:
84diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml
85index c28518da..83430c33 100644
86--- a/cinder/templates/deployment-volume.yaml
87+++ b/cinder/templates/deployment-volume.yaml
88@@ -48,6 +48,12 @@ spec:
89 {{ tuple "cinder_volume" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
90 {{ dict "envAll" $envAll "podName" "cinder-volume" "containerNames" (list "cinder-volume" "ceph-coordination-volume-perms" "init-cinder-conf" "init" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
91 spec:
92+{{ with .Values.pod.priorityClassName.cinder_volume }}
93+ priorityClassName: {{ . }}
94+{{ end }}
95+{{ with .Values.pod.runtimeClassName.cinder_volume }}
96+ runtimeClassName: {{ . }}
97+{{ end }}
98 serviceAccountName: {{ $serviceAccountName }}
99 {{ dict "envAll" $envAll "application" "cinder_volume" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
100 affinity:
101diff --git a/cinder/templates/pod-rally-test.yaml b/cinder/templates/pod-rally-test.yaml
102index 34316c65..a2852359 100644
103--- a/cinder/templates/pod-rally-test.yaml
104+++ b/cinder/templates/pod-rally-test.yaml
105@@ -38,6 +38,12 @@ spec:
106 {{ end }}
107 nodeSelector:
108 {{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
109+{{ with .Values.pod.priorityClassName.cinder_tests }}
110+ priorityClassName: {{ . }}
111+{{ end }}
112+{{ with .Values.pod.runtimeClassName.cinder_tests }}
113+ runtimeClassName: {{ . }}
114+{{ end }}
115 serviceAccountName: {{ $serviceAccountName }}
116 initContainers:
117 {{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
118diff --git a/cinder/values.yaml b/cinder/values.yaml
119index 6b335be1..1377e4cd 100644
120--- a/cinder/values.yaml
121+++ b/cinder/values.yaml
122@@ -76,6 +76,22 @@ jobs:
123 failed: 1
124
125 pod:
126+ priorityClassName:
127+ cinder_api: null
128+ cinder_backup: null
129+ cinder_scheduler: null
130+ cinder_tests: null
131+ cinder_volume_usage_audit: null
132+ cinder_volume: null
133+ db_sync: null
134+ runtimeClassName:
135+ cinder_api: null
136+ cinder_backup: null
137+ cinder_scheduler: null
138+ cinder_tests: null
139+ cinder_volume_usage_audit: null
140+ cinder_volume: null
141+ db_sync: null
142 security_context:
143 volume_usage_audit:
144 pod:
145--
1462.43.0