diff --git a/horizon/Chart.yaml b/horizon/Chart.yaml index e870ff8280..bda3a43196 100644 --- a/horizon/Chart.yaml +++ b/horizon/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Horizon name: horizon -version: 0.2.17 +version: 0.2.18 home: https://docs.openstack.org/horizon/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Horizon/OpenStack_Project_Horizon_vertical.png sources: diff --git a/horizon/templates/deployment.yaml b/horizon/templates/deployment.yaml index 7159032fd5..e3978c588c 100644 --- a/horizon/templates/deployment.yaml +++ b/horizon/templates/deployment.yaml @@ -51,6 +51,9 @@ spec: {{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.dashboard.node_selector_key }}: {{ .Values.labels.dashboard.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.horizon.enabled }} +{{ tuple $envAll "horizon" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.horizon.timeout | default "30" }} initContainers: {{ tuple $envAll "dashboard" $mounts_horizon_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/horizon/templates/job-db-drop.yaml b/horizon/templates/job-db-drop.yaml index 2545845279..6f761d7c40 100644 --- a/horizon/templates/job-db-drop.yaml +++ b/horizon/templates/job-db-drop.yaml @@ -18,5 +18,8 @@ limitations under the License. {{- if .Values.manifests.certificates -}} {{- $_ := set $dbDropJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}} {{- end -}} +{{- if .Values.pod.tolerations.horizon.enabled -}} +{{- $_ := set $dbDropJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }} {{- end }} diff --git a/horizon/templates/job-db-init.yaml b/horizon/templates/job-db-init.yaml index f92c1838c5..095a1f3df8 100644 --- a/horizon/templates/job-db-init.yaml +++ b/horizon/templates/job-db-init.yaml @@ -18,5 +18,8 @@ limitations under the License. {{- if .Values.manifests.certificates -}} {{- $_ := set $dbInitJob "dbAdminTlsSecret" .Values.endpoints.oslo_db.auth.admin.secret.tls.internal -}} {{- end -}} +{{- if .Values.pod.tolerations.horizon.enabled -}} +{{- $_ := set $dbInitJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }} {{- end }} diff --git a/horizon/templates/job-db-sync.yaml b/horizon/templates/job-db-sync.yaml index 648a5b211d..fe5a213b06 100644 --- a/horizon/templates/job-db-sync.yaml +++ b/horizon/templates/job-db-sync.yaml @@ -42,6 +42,9 @@ spec: restartPolicy: OnFailure nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.horizon.enabled }} +{{ tuple $envAll "horizon" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} initContainers: {{ tuple $envAll "db_sync" $mounts_horizon_db_sync_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: diff --git a/horizon/templates/job-image-repo-sync.yaml b/horizon/templates/job-image-repo-sync.yaml index 37b14a8c21..e98bbb2414 100644 --- a/horizon/templates/job-image-repo-sync.yaml +++ b/horizon/templates/job-image-repo-sync.yaml @@ -14,5 +14,8 @@ limitations under the License. {{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} {{- $imageRepoSyncJob := dict "envAll" . "serviceName" "horizon" -}} +{{- if .Values.pod.tolerations.horizon.enabled -}} +{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}} +{{- end -}} {{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} {{- end }} diff --git a/horizon/templates/pod-helm-tests.yaml b/horizon/templates/pod-helm-tests.yaml index 76f5b353f2..dbcb9a3c1a 100644 --- a/horizon/templates/pod-helm-tests.yaml +++ b/horizon/templates/pod-helm-tests.yaml @@ -35,6 +35,9 @@ spec: {{ dict "envAll" $envAll "application" "test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }} restartPolicy: Never serviceAccountName: {{ $serviceAccountName }} +{{ if $envAll.Values.pod.tolerations.horizon.enabled }} +{{ tuple $envAll "horizon" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} nodeSelector: {{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }} initContainers: diff --git a/horizon/values.yaml b/horizon/values.yaml index 26d8dc3e48..0134ce187d 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -1129,6 +1129,13 @@ pod: default: kubernetes.io/hostname weight: default: 10 + tolerations: + horizon: + enabled: false + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule mounts: horizon_db_init: init_container: null diff --git a/releasenotes/notes/horizon.yaml b/releasenotes/notes/horizon.yaml index b0e233fee9..9f6dedfa72 100644 --- a/releasenotes/notes/horizon.yaml +++ b/releasenotes/notes/horizon.yaml @@ -27,4 +27,5 @@ horizon: - 0.2.15 Add local_settings.d - 0.2.16 Fix container-infra value - 0.2.17 Add custom logo + - 0.2.18 Enable taint toleration for Openstack services ...