blob: 4f5a15ffc3c35620f4336b458cfbaa0e17714dcd [file] [log] [blame]
Dong Ma9403e982025-02-11 11:03:48 +00001From c11ca88302027988fa44059991141395475c103e Mon Sep 17 00:00:00 2001
2From: Dong Ma <dong.ma@vexxhost.com>
3Date: Tue, 11 Feb 2025 11:03:48 +0000
4Subject: [PATCH] Enable {priority,runtime}ClassName for Neutron
5
6---
7 .../templates/daemonset-bagpipe-bgp.yaml | 6 ++++
8 .../templates/daemonset-bgp-dragent.yaml | 6 ++++
9 .../templates/daemonset-dhcp-agent.yaml | 6 ++++
10 .../templates/daemonset-l2gw-agent.yaml | 6 ++++
11 .../neutron/templates/daemonset-l3-agent.yaml | 6 ++++
12 .../neutron/templates/daemonset-lb-agent.yaml | 6 ++++
13 .../templates/daemonset-metadata-agent.yaml | 6 ++++
14 .../daemonset-netns-cleanup-cron.yaml | 6 ++++
15 .../daemonset-ovn-metadata-agent.yaml | 6 ++++
16 .../templates/daemonset-ovs-agent.yaml | 6 ++++
17 .../templates/daemonset-sriov-agent.yaml | 6 ++++
18 .../templates/deployment-ironic-agent.yaml | 6 ++++
19 .../templates/deployment-rpc_server.yaml | 6 ++++
20 .../neutron/templates/deployment-server.yaml | 6 ++++
21 neutron/templates/pod-rally-test.yaml | 6 ++++
22 neutron/values.yaml | 36 +++++++++++++++++++
23 17 files changed, 132 insertions(+)
24
25diff --git a/neutron/templates/daemonset-bagpipe-bgp.yaml b/neutron/templates/daemonset-bagpipe-bgp.yaml
26index b6d2157e..fd4f0930 100644
27--- a/neutron/templates/daemonset-bagpipe-bgp.yaml
28+++ b/neutron/templates/daemonset-bagpipe-bgp.yaml
29@@ -57,6 +57,12 @@ spec:
30 {{ tuple "neutron_bagpipe_bgp" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
31 spec:
32 {{ dict "envAll" $envAll "application" "neutron_bagpipe_bgp" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
33+{{ with .Values.pod.priorityClassName.neutron_bagpipe_bgp }}
34+ priorityClassName: {{ . }}
35+{{ end }}
36+{{ with .Values.pod.runtimeClassName.neutron_bagpipe_bgp }}
37+ runtimeClassName: {{ . }}
38+{{ end }}
39 serviceAccountName: {{ $serviceAccountName }}
40 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
41 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
42diff --git a/neutron/templates/daemonset-bgp-dragent.yaml b/neutron/templates/daemonset-bgp-dragent.yaml
43index b0494c3e..caa61391 100644
44--- a/neutron/templates/daemonset-bgp-dragent.yaml
45+++ b/neutron/templates/daemonset-bgp-dragent.yaml
46@@ -56,6 +56,12 @@ spec:
47 {{ tuple "neutron_bgp_dragent" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
48 spec:
49 {{ dict "envAll" $envAll "application" "neutron_bgp_dragent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
50+{{ with .Values.pod.priorityClassName.neutron_bgp_dragent }}
51+ priorityClassName: {{ . }}
52+{{ end }}
53+{{ with .Values.pod.runtimeClassName.neutron_bgp_dragent }}
54+ runtimeClassName: {{ . }}
55+{{ end }}
56 serviceAccountName: {{ $serviceAccountName }}
57 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
58 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
59diff --git a/neutron/templates/daemonset-dhcp-agent.yaml b/neutron/templates/daemonset-dhcp-agent.yaml
60index 17e15f8e..b51d179d 100644
61--- a/neutron/templates/daemonset-dhcp-agent.yaml
62+++ b/neutron/templates/daemonset-dhcp-agent.yaml
63@@ -79,6 +79,12 @@ spec:
64 {{ dict "envAll" $envAll "podName" "neutron-dhcp-agent-default" "containerNames" (list "neutron-dhcp-agent" "neutron-dhcp-agent-init" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
65 spec:
66 {{ dict "envAll" $envAll "application" "neutron_dhcp_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
67+{{ with .Values.pod.priorityClassName.neutron_dhcp_agent }}
68+ priorityClassName: {{ . }}
69+{{ end }}
70+{{ with .Values.pod.runtimeClassName.neutron_dhcp_agent }}
71+ runtimeClassName: {{ . }}
72+{{ end }}
73 serviceAccountName: {{ $serviceAccountName }}
74 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
75 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
76diff --git a/neutron/templates/daemonset-l2gw-agent.yaml b/neutron/templates/daemonset-l2gw-agent.yaml
77index e9481981..ab984a30 100644
78--- a/neutron/templates/daemonset-l2gw-agent.yaml
79+++ b/neutron/templates/daemonset-l2gw-agent.yaml
80@@ -80,6 +80,12 @@ spec:
81 {{ tuple "neutron_l2gw_agent" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
82 spec:
83 {{ dict "envAll" $envAll "application" "neutron_l2gw_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
84+{{ with .Values.pod.priorityClassName.neutron_l2gw_agent }}
85+ priorityClassName: {{ . }}
86+{{ end }}
87+{{ with .Values.pod.runtimeClassName.neutron_l2gw_agent }}
88+ runtimeClassName: {{ . }}
89+{{ end }}
90 serviceAccountName: {{ $serviceAccountName }}
91 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
92 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
93diff --git a/neutron/templates/daemonset-l3-agent.yaml b/neutron/templates/daemonset-l3-agent.yaml
94index b4bbd096..21b45d71 100644
95--- a/neutron/templates/daemonset-l3-agent.yaml
96+++ b/neutron/templates/daemonset-l3-agent.yaml
97@@ -80,6 +80,12 @@ spec:
98 {{ dict "envAll" $envAll "podName" "neutron-l3-agent-default" "containerNames" (list "neutron-l3-agent" "init" "neutron-l3-agent-init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
99 spec:
100 {{ dict "envAll" $envAll "application" "neutron_l3_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
101+{{ with .Values.pod.priorityClassName.neutron_l3_agent }}
102+ priorityClassName: {{ . }}
103+{{ end }}
104+{{ with .Values.pod.runtimeClassName.neutron_l3_agent }}
105+ runtimeClassName: {{ . }}
106+{{ end }}
107 serviceAccountName: {{ $serviceAccountName }}
108 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
109 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
110diff --git a/neutron/templates/daemonset-lb-agent.yaml b/neutron/templates/daemonset-lb-agent.yaml
111index 35ff8fe0..77337f7a 100644
112--- a/neutron/templates/daemonset-lb-agent.yaml
113+++ b/neutron/templates/daemonset-lb-agent.yaml
114@@ -55,6 +55,12 @@ spec:
115 {{ tuple "neutron_lb_agent" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
116 spec:
117 {{ dict "envAll" $envAll "application" "neutron_lb_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
118+{{ with .Values.pod.priorityClassName.neutron_lb_agent }}
119+ priorityClassName: {{ . }}
120+{{ end }}
121+{{ with .Values.pod.runtimeClassName.neutron_lb_agent }}
122+ runtimeClassName: {{ . }}
123+{{ end }}
124 serviceAccountName: {{ $serviceAccountName }}
125 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
126 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
127diff --git a/neutron/templates/daemonset-metadata-agent.yaml b/neutron/templates/daemonset-metadata-agent.yaml
128index fc9a75ee..229ed5c6 100644
129--- a/neutron/templates/daemonset-metadata-agent.yaml
130+++ b/neutron/templates/daemonset-metadata-agent.yaml
131@@ -76,6 +76,12 @@ spec:
132 {{ dict "envAll" $envAll "podName" "neutron-metadata-agent-default" "containerNames" (list "neutron-metadata-agent" "neutron-metadata-agent-init" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
133 spec:
134 {{ dict "envAll" $envAll "application" "neutron_metadata_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
135+{{ with .Values.pod.priorityClassName.neutron_metadata_agent }}
136+ priorityClassName: {{ . }}
137+{{ end }}
138+{{ with .Values.pod.runtimeClassName.neutron_metadata_agent }}
139+ runtimeClassName: {{ . }}
140+{{ end }}
141 serviceAccountName: {{ $serviceAccountName }}
142 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
143 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
144diff --git a/neutron/templates/daemonset-netns-cleanup-cron.yaml b/neutron/templates/daemonset-netns-cleanup-cron.yaml
145index d43c5950..df50c45a 100644
146--- a/neutron/templates/daemonset-netns-cleanup-cron.yaml
147+++ b/neutron/templates/daemonset-netns-cleanup-cron.yaml
148@@ -48,6 +48,12 @@ spec:
149 {{ dict "envAll" $envAll "podName" "neutron-netns-cleanup-cron-default" "containerNames" (list "neutron-netns-cleanup-cron" "init" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
150 spec:
151 {{ dict "envAll" $envAll "application" "neutron_netns_cleanup_cron" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
152+{{ with .Values.pod.priorityClassName.neutron_netns_cleanup_cron }}
153+ priorityClassName: {{ . }}
154+{{ end }}
155+{{ with .Values.pod.runtimeClassName.neutron_netns_cleanup_cron }}
156+ runtimeClassName: {{ . }}
157+{{ end }}
158 serviceAccountName: {{ $serviceAccountName }}
159 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
160 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
161diff --git a/neutron/templates/daemonset-ovn-metadata-agent.yaml b/neutron/templates/daemonset-ovn-metadata-agent.yaml
162index 47e12567..80ca3f07 100644
163--- a/neutron/templates/daemonset-ovn-metadata-agent.yaml
164+++ b/neutron/templates/daemonset-ovn-metadata-agent.yaml
165@@ -76,6 +76,12 @@ spec:
166 {{ dict "envAll" $envAll "podName" "neutron-ovn-metadata-agent-default" "containerNames" (list "neutron-ovn-metadata-agent" "neutron-ovn-metadata-agent-init" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
167 spec:
168 {{ dict "envAll" $envAll "application" "neutron_ovn_metadata_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
169+{{ with .Values.pod.priorityClassName.neutron_ovn_metadata_agent }}
170+ priorityClassName: {{ . }}
171+{{ end }}
172+{{ with .Values.pod.runtimeClassName.neutron_ovn_metadata_agent }}
173+ runtimeClassName: {{ . }}
174+{{ end }}
175 serviceAccountName: {{ $serviceAccountName }}
176 {{ if $envAll.Values.pod.tolerations.neutron.enabled }}
177 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
178diff --git a/neutron/templates/daemonset-ovs-agent.yaml b/neutron/templates/daemonset-ovs-agent.yaml
179index 0ea60f58..c6eb4c01 100644
180--- a/neutron/templates/daemonset-ovs-agent.yaml
181+++ b/neutron/templates/daemonset-ovs-agent.yaml
182@@ -59,6 +59,12 @@ spec:
183 {{ dict "envAll" $envAll "podName" "$configMapName" "containerNames" (list "neutron-ovs-agent" "init" "neutron-openvswitch-agent-kernel-modules" "neutron-ovs-agent-init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
184 spec:
185 {{ dict "envAll" $envAll "application" "neutron_ovs_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
186+{{ with .Values.pod.priorityClassName.neutron_ovs_agent }}
187+ priorityClassName: {{ . }}
188+{{ end }}
189+{{ with .Values.pod.runtimeClassName.neutron_ovs_agent }}
190+ runtimeClassName: {{ . }}
191+{{ end }}
192 serviceAccountName: {{ $serviceAccountName }}
193 nodeSelector:
194 {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
195diff --git a/neutron/templates/daemonset-sriov-agent.yaml b/neutron/templates/daemonset-sriov-agent.yaml
196index 5b96cd7c..efd48e01 100644
197--- a/neutron/templates/daemonset-sriov-agent.yaml
198+++ b/neutron/templates/daemonset-sriov-agent.yaml
199@@ -62,6 +62,12 @@ spec:
200 {{ dict "envAll" $envAll "podName" "neutron-sriov-agent-default" "containerNames" (list "neutron-sriov-agent-init" "init" "neutron-sriov-agent") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
201 spec:
202 {{ dict "envAll" $envAll "application" "neutron_sriov_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
203+{{ with .Values.pod.priorityClassName.neutron_sriov_agent }}
204+ priorityClassName: {{ . }}
205+{{ end }}
206+{{ with .Values.pod.runtimeClassName.neutron_sriov_agent }}
207+ runtimeClassName: {{ . }}
208+{{ end }}
209 serviceAccountName: {{ $serviceAccountName }}
210 nodeSelector:
211 {{ .Values.labels.sriov.node_selector_key }}: {{ .Values.labels.sriov.node_selector_value }}
212diff --git a/neutron/templates/deployment-ironic-agent.yaml b/neutron/templates/deployment-ironic-agent.yaml
213index 1b468e2b..8d2663f9 100644
214--- a/neutron/templates/deployment-ironic-agent.yaml
215+++ b/neutron/templates/deployment-ironic-agent.yaml
216@@ -49,6 +49,12 @@ spec:
217 {{ tuple "neutron_ironic_agent" . | include "helm-toolkit.snippets.custom_pod_annotations" | indent 8 }}
218 spec:
219 {{ dict "envAll" $envAll "application" "neutron_ironic_agent" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
220+{{ with .Values.pod.priorityClassName.neutron_ironic_agent }}
221+ priorityClassName: {{ . }}
222+{{ end }}
223+{{ with .Values.pod.runtimeClassName.neutron_ironic_agent }}
224+ runtimeClassName: {{ . }}
225+{{ end }}
226 serviceAccountName: {{ $serviceAccountName }}
227 affinity:
228 {{ tuple $envAll "neutron" "ironic_agent" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
229diff --git a/neutron/templates/deployment-rpc_server.yaml b/neutron/templates/deployment-rpc_server.yaml
230index 1866e21e..f5f72403 100644
231--- a/neutron/templates/deployment-rpc_server.yaml
232+++ b/neutron/templates/deployment-rpc_server.yaml
233@@ -49,6 +49,12 @@ spec:
234 {{ dict "envAll" $envAll "podName" "neutron-rpc-server" "containerNames" (list "neutron-rpc-server" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
235 spec:
236 {{ dict "envAll" $envAll "application" "neutron_rpc_server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
237+{{ with .Values.pod.priorityClassName.neutron_rpc_server }}
238+ priorityClassName: {{ . }}
239+{{ end }}
240+{{ with .Values.pod.runtimeClassName.neutron_rpc_server }}
241+ runtimeClassName: {{ . }}
242+{{ end }}
243 serviceAccountName: {{ $serviceAccountName }}
244 affinity:
245 {{ tuple $envAll "neutron" "rpc_server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
246diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml
247index 457401b4..464b3c3c 100644
248--- a/neutron/templates/deployment-server.yaml
249+++ b/neutron/templates/deployment-server.yaml
250@@ -81,6 +81,12 @@ spec:
251 {{ dict "envAll" $envAll "podName" "neutron-server" "containerNames" (list "neutron-server" "init" "nginx") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
252 spec:
253 {{ dict "envAll" $envAll "application" "neutron_server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
254+{{ with .Values.pod.priorityClassName.neutron_server }}
255+ priorityClassName: {{ . }}
256+{{ end }}
257+{{ with .Values.pod.runtimeClassName.neutron_server }}
258+ runtimeClassName: {{ . }}
259+{{ end }}
260 serviceAccountName: {{ $serviceAccountName }}
261 affinity:
262 {{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
263diff --git a/neutron/templates/pod-rally-test.yaml b/neutron/templates/pod-rally-test.yaml
264index 5ef57fa3..a1e3e1ad 100644
265--- a/neutron/templates/pod-rally-test.yaml
266+++ b/neutron/templates/pod-rally-test.yaml
267@@ -44,6 +44,12 @@ spec:
268 {{ tuple $envAll "neutron" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }}
269 {{ end }}
270 restartPolicy: Never
271+{{ with .Values.pod.priorityClassName.neutron_tests }}
272+ priorityClassName: {{ . }}
273+{{ end }}
274+{{ with .Values.pod.runtimeClassName.neutron_tests }}
275+ runtimeClassName: {{ . }}
276+{{ end }}
277 serviceAccountName: {{ $serviceAccountName }}
278 initContainers:
279 {{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
280diff --git a/neutron/values.yaml b/neutron/values.yaml
281index b1ff4569..0f559976 100644
282--- a/neutron/values.yaml
283+++ b/neutron/values.yaml
284@@ -389,6 +389,42 @@ dependencies:
285 service: local_image_registry
286
287 pod:
288+ priorityClassName:
289+ neutron_bagpipe_bgp: null
290+ neutron_bgp_dragent: null
291+ neutron_dhcp_agent: null
292+ neutron_l2gw_agent: null
293+ neutron_l3_agent: null
294+ neutron_lb_agent: null
295+ neutron_metadata_agent: null
296+ neutron_netns_cleanup_cron: null
297+ neutron_ovn_vpn_agent: null
298+ neutron_ovn_metadata_agent: null
299+ neutron_ovs_agent: null
300+ neutron_sriov_agent: null
301+ neutron_ironic_agent: null
302+ neutron_rpc_server: null
303+ neutron_server: null
304+ neutron_tests: null
305+ db_sync: null
306+ runtimeClassName:
307+ neutron_bagpipe_bgp: null
308+ neutron_bgp_dragent: null
309+ neutron_dhcp_agent: null
310+ neutron_l2gw_agent: null
311+ neutron_l3_agent: null
312+ neutron_lb_agent: null
313+ neutron_metadata_agent: null
314+ neutron_netns_cleanup_cron: null
315+ neutron_ovn_vpn_agent: null
316+ neutron_ovn_metadata_agent: null
317+ neutron_ovs_agent: null
318+ neutron_sriov_agent: null
319+ neutron_ironic_agent: null
320+ neutron_rpc_server: null
321+ neutron_server: null
322+ neutron_tests: null
323+ db_sync: null
324 sidecars:
325 neutron_policy_server: false
326 use_fqdn:
327--
3282.34.1
329