blob: 3212d7194b428efffdd4e0f634ece875ba2f4a36 [file] [log] [blame]
Dong Ma88ac73f2025-02-10 14:58:50 +00001From 9f293fef1eed2e6ef7aa372ad5a7c9293b11a15f Mon Sep 17 00:00:00 2001
2From: Dong Ma <dong.ma@vexxhost.com>
3Date: Mon, 10 Feb 2025 14:58:50 +0000
4Subject: [PATCH] Enable {priority,runtime}ClassName for Keystone
5
6---
7 keystone/templates/cron-job-credential-rotate.yaml | 6 ++++++
8 keystone/templates/cron-job-fernet-rotate.yaml | 6 ++++++
9 keystone/templates/deployment-api.yaml | 6 ++++++
10 keystone/templates/pod-rally-test.yaml | 6 ++++++
11 keystone/values.yaml | 12 ++++++++++++
12 5 files changed, 36 insertions(+)
13
14diff --git a/keystone/templates/cron-job-credential-rotate.yaml b/keystone/templates/cron-job-credential-rotate.yaml
15index 59060796..6fabd9dd 100644
16--- a/keystone/templates/cron-job-credential-rotate.yaml
17+++ b/keystone/templates/cron-job-credential-rotate.yaml
18@@ -70,6 +70,12 @@ spec:
19 labels:
20 {{ tuple $envAll "keystone" "credential-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }}
21 spec:
22+{{ with .Values.pod.priorityClassName.keystone_credential_rotate }}
23+ priorityClassName: {{ . }}
24+{{ end }}
25+{{ with .Values.pod.runtimeClassName.keystone_credential_rotate }}
26+ runtimeClassName: {{ . }}
27+{{ end }}
28 serviceAccountName: {{ $serviceAccountName }}
29 initContainers:
30 {{ tuple $envAll "credential_rotate" $mounts_keystone_credential_rotate_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
31diff --git a/keystone/templates/cron-job-fernet-rotate.yaml b/keystone/templates/cron-job-fernet-rotate.yaml
32index a059f929..e9118423 100644
33--- a/keystone/templates/cron-job-fernet-rotate.yaml
34+++ b/keystone/templates/cron-job-fernet-rotate.yaml
35@@ -71,6 +71,12 @@ spec:
36 labels:
37 {{ tuple $envAll "keystone" "fernet-rotate" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 12 }}
38 spec:
39+{{ with .Values.pod.priorityClassName.keystone_fernet_rotate }}
40+ priorityClassName: {{ . }}
41+{{ end }}
42+{{ with .Values.pod.runtimeClassName.keystone_fernet_rotate }}
43+ runtimeClassName: {{ . }}
44+{{ end }}
45 serviceAccountName: {{ $serviceAccountName }}
46 {{ dict "envAll" $envAll "application" "fernet_rotate" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 10 }}
47 initContainers:
48diff --git a/keystone/templates/deployment-api.yaml b/keystone/templates/deployment-api.yaml
49index ee4e13c9..36050a5c 100644
50--- a/keystone/templates/deployment-api.yaml
51+++ b/keystone/templates/deployment-api.yaml
52@@ -54,6 +54,12 @@ spec:
53 {{ dict "envAll" $envAll "podName" "keystone-api" "containerNames" (list "keystone-api") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
54 spec:
55 {{ dict "envAll" $envAll "application" "keystone" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
56+{{ with .Values.pod.priorityClassName.keystone_api }}
57+ priorityClassName: {{ . }}
58+{{ end }}
59+{{ with .Values.pod.runtimeClassName.keystone_api }}
60+ runtimeClassName: {{ . }}
61+{{ end }}
62 serviceAccountName: {{ $serviceAccountName }}
63 affinity:
64 {{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
65diff --git a/keystone/templates/pod-rally-test.yaml b/keystone/templates/pod-rally-test.yaml
66index ad5b23a0..155dbae3 100644
67--- a/keystone/templates/pod-rally-test.yaml
68+++ b/keystone/templates/pod-rally-test.yaml
69@@ -42,6 +42,12 @@ spec:
70 {{ dict "envAll" $envAll "application" "test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }}
71 nodeSelector:
72 {{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
73+{{ with .Values.pod.priorityClassName.keystone_tests }}
74+ priorityClassName: {{ . }}
75+{{ end }}
76+{{ with .Values.pod.runtimeClassName.keystone_tests }}
77+ runtimeClassName: {{ . }}
78+{{ end }}
79 serviceAccountName: {{ $serviceAccountName }}
80 initContainers:
81 {{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
82diff --git a/keystone/values.yaml b/keystone/values.yaml
83index 27e767cf..c23a4ac0 100644
84--- a/keystone/values.yaml
85+++ b/keystone/values.yaml
86@@ -158,6 +158,18 @@ dependencies:
87 service: local_image_registry
88
89 pod:
90+ priorityClassName:
91+ keystone_api: null
92+ keystone_tests: null
93+ keystone_credential_rotate: null
94+ keystone_fernet_rotate: null
95+ db_sync: null
96+ runtimeClassName:
97+ keystone_api: null
98+ keystone_tests: null
99+ keystone_credential_rotate: null
100+ keystone_fernet_rotate: null
101+ db_sync: null
102 security_context:
103 keystone:
104 pod:
105--
1062.34.1
107