| From 1df9feeb330507bc2f988951e2b4813408621cb3 Mon Sep 17 00:00:00 2001 |
| From: Dong Ma <dong.ma@vexxhost.com> |
| Date: Thu, 13 Feb 2025 16:15:52 +0000 |
| Subject: [PATCH] Fix the missing {priority,runtime}ClassName |
| |
| diff --git a/keystone/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl b/keystone/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl |
| index 6b77004f..da3c4819 100644 |
| --- a/keystone/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl |
| +++ b/keystone/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl |
| @@ -70,6 +70,12 @@ spec: |
| annotations: |
| {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }} |
| spec: |
| +{{- if and $envAll.Values.pod.priorityClassName $envAll.Values.pod.priorityClassName.bootstrap }} |
| + priorityClassName: {{ $envAll.Values.pod.priorityClassName.bootstrap }} |
| +{{- end }} |
| +{{- if and $envAll.Values.pod.runtimeClassName $envAll.Values.pod.runtimeClassName.bootstrap }} |
| + runtimeClassName: {{ $envAll.Values.pod.runtimeClassName.bootstrap }} |
| +{{- end }} |
| serviceAccountName: {{ $serviceAccountName }} |
| restartPolicy: OnFailure |
| {{ tuple $envAll "bootstrap" | include "helm-toolkit.snippets.kubernetes_image_pull_secrets" | indent 6 }} |
| diff --git a/keystone/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl b/keystone/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl |
| index b8a1dce3..1db62b01 100644 |
| --- a/keystone/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl |
| +++ b/keystone/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl |
| @@ -71,6 +71,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_init }} |
| + priorityClassName: {{ $envAll.Values.pod.priorityClassName.db_init }} |
| +{{- end }} |
| +{{- if and $envAll.Values.pod.runtimeClassName $envAll.Values.pod.runtimeClassName.db_init }} |
| + runtimeClassName: {{ $envAll.Values.pod.runtimeClassName.db_init }} |
| +{{- end }} |
| serviceAccountName: {{ $serviceAccountName }} |
| restartPolicy: OnFailure |
| {{ tuple $envAll "db_init" | include "helm-toolkit.snippets.kubernetes_image_pull_secrets" | indent 6 }} |
| diff --git a/keystone/templates/job-credential-cleanup.yaml b/keystone/templates/job-credential-cleanup.yaml |
| index 9f268027..3eac2b39 100644 |
| --- a/keystone/templates/job-credential-cleanup.yaml |
| +++ b/keystone/templates/job-credential-cleanup.yaml |
| @@ -45,6 +45,12 @@ spec: |
| configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} |
| {{ dict "envAll" $envAll "podName" "keystone-credential-cleanup" "containerNames" (list "keystone-credential-cleanup") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} |
| spec: |
| +{{ with .Values.pod.priorityClassName.keystone_credential_cleanup }} |
| + priorityClassName: {{ . }} |
| +{{ end }} |
| +{{ with .Values.pod.runtimeClassName.keystone_credential_cleanup }} |
| + runtimeClassName: {{ . }} |
| +{{ end }} |
| serviceAccountName: {{ $serviceName }} |
| restartPolicy: Never |
| {{ if $envAll.Values.pod.tolerations.keystone.enabled }} |
| diff --git a/keystone/templates/job-credential-setup.yaml b/keystone/templates/job-credential-setup.yaml |
| index 38ff3c8b..c8710b63 100644 |
| --- a/keystone/templates/job-credential-setup.yaml |
| +++ b/keystone/templates/job-credential-setup.yaml |
| @@ -74,6 +74,12 @@ spec: |
| configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} |
| {{ dict "envAll" $envAll "podName" "keystone-credential-setup" "containerNames" (list "keystone-credential-setup") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} |
| spec: |
| +{{ with .Values.pod.priorityClassName.keystone_credential_setup }} |
| + priorityClassName: {{ . }} |
| +{{ end }} |
| +{{ with .Values.pod.runtimeClassName.keystone_credential_setup }} |
| + runtimeClassName: {{ . }} |
| +{{ end }} |
| serviceAccountName: {{ $serviceAccountName }} |
| {{ dict "envAll" $envAll "application" "credential_setup" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} |
| initContainers: |
| diff --git a/keystone/templates/job-domain-manage.yaml b/keystone/templates/job-domain-manage.yaml |
| index 87c82ebd..41bc9b11 100644 |
| --- a/keystone/templates/job-domain-manage.yaml |
| +++ b/keystone/templates/job-domain-manage.yaml |
| @@ -42,6 +42,12 @@ spec: |
| configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} |
| {{ dict "envAll" $envAll "podName" "keystone-domain-manage" "containerNames" (list "keystone-domain-manage" "keystone-domain-manage-init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} |
| spec: |
| +{{ with .Values.pod.priorityClassName.keystone_domain_manage }} |
| + priorityClassName: {{ . }} |
| +{{ end }} |
| +{{ with .Values.pod.runtimeClassName.keystone_domain_manage }} |
| + runtimeClassName: {{ . }} |
| +{{ end }} |
| serviceAccountName: {{ $serviceAccountName }} |
| {{ dict "envAll" $envAll "application" "domain_manage" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} |
| restartPolicy: OnFailure |
| diff --git a/keystone/templates/job-fernet-setup.yaml b/keystone/templates/job-fernet-setup.yaml |
| index d52aa6ce..f41e788d 100644 |
| --- a/keystone/templates/job-fernet-setup.yaml |
| +++ b/keystone/templates/job-fernet-setup.yaml |
| @@ -74,6 +74,12 @@ spec: |
| configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} |
| {{ dict "envAll" $envAll "podName" "keystone-fernet-setup" "containerNames" (list "keystone-fernet-setup") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }} |
| spec: |
| +{{ with .Values.pod.priorityClassName.keystone_fernet_setup }} |
| + priorityClassName: {{ . }} |
| +{{ end }} |
| +{{ with .Values.pod.runtimeClassName.keystone_fernet_setup }} |
| + runtimeClassName: {{ . }} |
| +{{ end }} |
| serviceAccountName: {{ $serviceAccountName }} |
| {{ dict "envAll" $envAll "application" "fernet_setup" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} |
| initContainers: |
| diff --git a/keystone/values.yaml b/keystone/values.yaml |
| index c23a4ac0..65e6f658 100644 |
| --- a/keystone/values.yaml |
| +++ b/keystone/values.yaml |
| @@ -163,12 +163,24 @@ pod: |
| keystone_tests: null |
| keystone_credential_rotate: null |
| keystone_fernet_rotate: null |
| + keystone_credential_setup: null |
| + keystone_fernet_setup: null |
| + keystone_domain_manage: null |
| + keystone_credential_cleanup: null |
| + bootstrap: null |
| + db_init: null |
| db_sync: null |
| runtimeClassName: |
| keystone_api: null |
| keystone_tests: null |
| keystone_credential_rotate: null |
| keystone_fernet_rotate: null |
| + keystone_credential_setup: null |
| + keystone_fernet_setup: null |
| + keystone_domain_manage: null |
| + keystone_credential_cleanup: null |
| + bootstrap: null |
| + db_init: null |
| db_sync: null |
| security_context: |
| keystone: |