diff --git a/aodh/Chart.yaml b/aodh/Chart.yaml index a8c8290839..e6c72454f9 100644 --- a/aodh/Chart.yaml +++ b/aodh/Chart.yaml @@ -16,7 +16,7 @@ apiVersion: v1 appVersion: v1.0.0 description: Openstack-Helm Aodh name: aodh -version: 0.2.2 +version: 0.2.3 home: https://docs.openstack.org/aodh/latest/ sources: - https://opendev.org/openstack/aodh diff --git a/aodh/templates/cron-job-alarms-cleaner.yaml b/aodh/templates/cron-job-alarms-cleaner.yaml index ae39e7a149..35f78e4356 100644 --- a/aodh/templates/cron-job-alarms-cleaner.yaml +++ b/aodh/templates/cron-job-alarms-cleaner.yaml @@ -48,6 +48,9 @@ spec: restartPolicy: OnFailure nodeSelector: {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.aodh.enabled }} +{{ tuple $envAll "aodh" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 10 }} +{{ end }} initContainers: {{ tuple $envAll "alarms_cleaner" $mounts_aodh_alarms_cleaner_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }} containers: diff --git a/aodh/templates/deployment-api.yaml b/aodh/templates/deployment-api.yaml index c4ae5efd95..8c4f86cbcb 100644 --- a/aodh/templates/deployment-api.yaml +++ b/aodh/templates/deployment-api.yaml @@ -52,6 +52,9 @@ spec: {{ tuple $envAll "aodh" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.aodh.enabled }} +{{ tuple $envAll "aodh" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }} initContainers: {{ tuple $envAll "api" $mounts_aodh_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/aodh/templates/deployment-evaluator.yaml b/aodh/templates/deployment-evaluator.yaml index b44aae2ef0..8363332d66 100644 --- a/aodh/templates/deployment-evaluator.yaml +++ b/aodh/templates/deployment-evaluator.yaml @@ -52,6 +52,9 @@ spec: {{ tuple $envAll "aodh" "evaluator" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.evaluator.node_selector_key }}: {{ .Values.labels.evaluator.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.aodh.enabled }} +{{ tuple $envAll "aodh" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} initContainers: {{ tuple $envAll "evaluator" $mounts_aodh_evaluator_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: diff --git a/aodh/templates/deployment-listener.yaml b/aodh/templates/deployment-listener.yaml index db137f6a40..0a95a66aaf 100644 --- a/aodh/templates/deployment-listener.yaml +++ b/aodh/templates/deployment-listener.yaml @@ -52,6 +52,9 @@ spec: {{ tuple $envAll "aodh" "listener" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.listener.node_selector_key }}: {{ .Values.labels.listener.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.aodh.enabled }} +{{ tuple $envAll "aodh" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} initContainers: {{ tuple $envAll "listener" $mounts_aodh_listener_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: diff --git a/aodh/templates/deployment-notifier.yaml b/aodh/templates/deployment-notifier.yaml index 7ee8d866c1..2c114e0125 100644 --- a/aodh/templates/deployment-notifier.yaml +++ b/aodh/templates/deployment-notifier.yaml @@ -52,6 +52,9 @@ spec: {{ tuple $envAll "aodh" "notifier" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: {{ .Values.labels.notifier.node_selector_key }}: {{ .Values.labels.notifier.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.aodh.enabled }} +{{ tuple $envAll "aodh" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} +{{ end }} initContainers: {{ tuple $envAll "notifier" $mounts_aodh_notifier_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: diff --git a/aodh/templates/job-bootstrap.yaml b/aodh/templates/job-bootstrap.yaml index e6b6f7a73c..9ec2874cec 100644 --- a/aodh/templates/job-bootstrap.yaml +++ b/aodh/templates/job-bootstrap.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }} {{- $bootstrapJob := dict "envAll" . "serviceName" "aodh" "keystoneUser" .Values.bootstrap.ks_user -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $bootstrapJob "tolerationsEnabled" true -}} +{{- end -}} {{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }} {{- end }} diff --git a/aodh/templates/job-db-drop.yaml b/aodh/templates/job-db-drop.yaml index 5f5129a3ea..2cb1b1f7ae 100644 --- a/aodh/templates/job-db-drop.yaml +++ b/aodh/templates/job-db-drop.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if .Values.manifests.job_db_drop }} {{- $dbDropJob := dict "envAll" . "serviceName" "aodh" -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $dbDropJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }} {{- end }} diff --git a/aodh/templates/job-db-init.yaml b/aodh/templates/job-db-init.yaml index 8d0fddebe2..b640d6949d 100644 --- a/aodh/templates/job-db-init.yaml +++ b/aodh/templates/job-db-init.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if .Values.manifests.job_db_init }} {{- $dbInitJob := dict "envAll" . "serviceName" "aodh" -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $dbInitJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }} {{- end }} diff --git a/aodh/templates/job-db-sync.yaml b/aodh/templates/job-db-sync.yaml index 11f14fa373..36aefc6113 100644 --- a/aodh/templates/job-db-sync.yaml +++ b/aodh/templates/job-db-sync.yaml @@ -17,5 +17,8 @@ limitations under the License. {{- if .Values.manifests.job_db_sync }} {{- $dbSyncJob := dict "envAll" . "serviceName" "aodh" -}} {{- $dbSyncJob := dict "envAll" . "serviceName" "aodh" "podVolMounts" .Values.pod.mounts.aodh_db_sync.aodh_db_sync.volumeMounts "podVols" .Values.pod.mounts.aodh_db_sync.aodh_db_sync.volumes -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $dbSyncJob "tolerationsEnabled" true -}} +{{- end -}} {{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }} {{- end }} diff --git a/aodh/templates/job-image-repo-sync.yaml b/aodh/templates/job-image-repo-sync.yaml index ebab594f0d..78403f99c2 100644 --- a/aodh/templates/job-image-repo-sync.yaml +++ b/aodh/templates/job-image-repo-sync.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} {{- $imageRepoSyncJob := dict "envAll" . "serviceName" "aodh" -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}} +{{- end -}} {{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }} {{- end }} diff --git a/aodh/templates/job-ks-endpoints.yaml b/aodh/templates/job-ks-endpoints.yaml index 61819c8342..6f0214e554 100644 --- a/aodh/templates/job-ks-endpoints.yaml +++ b/aodh/templates/job-ks-endpoints.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if .Values.manifests.job_ks_endpoints }} {{- $ksServiceJob := dict "envAll" . "serviceName" "aodh" "serviceTypes" ( tuple "alarming" ) -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $ksServiceJob "tolerationsEnabled" true -}} +{{- end -}} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }} {{- end }} diff --git a/aodh/templates/job-ks-service.yaml b/aodh/templates/job-ks-service.yaml index 2c14e1a40d..95c2e0bab2 100644 --- a/aodh/templates/job-ks-service.yaml +++ b/aodh/templates/job-ks-service.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if .Values.manifests.job_ks_service }} {{- $ksServiceJob := dict "envAll" . "serviceName" "aodh" "serviceTypes" ( tuple "alarming" ) -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $ksServiceJob "tolerationsEnabled" true -}} +{{- end -}} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }} {{- end }} diff --git a/aodh/templates/job-ks-user.yaml b/aodh/templates/job-ks-user.yaml index d529fa3f08..9cb2502017 100644 --- a/aodh/templates/job-ks-user.yaml +++ b/aodh/templates/job-ks-user.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if .Values.manifests.job_ks_user }} {{- $ksUserJob := dict "envAll" . "serviceName" "aodh" -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $ksUserJob "tolerationsEnabled" true -}} +{{- end -}} {{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }} {{- end }} diff --git a/aodh/templates/job-rabbit-init.yaml b/aodh/templates/job-rabbit-init.yaml index 866cbbd492..40aac926b5 100644 --- a/aodh/templates/job-rabbit-init.yaml +++ b/aodh/templates/job-rabbit-init.yaml @@ -16,5 +16,8 @@ limitations under the License. {{- if .Values.manifests.job_rabbit_init }} {{- $rmqUserJob := dict "envAll" . "serviceName" "aodh" -}} +{{- if .Values.pod.tolerations.aodh.enabled -}} +{{- $_ := set $rmqUserJob "tolerationsEnabled" true -}} +{{- end -}} {{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }} {{- end }} diff --git a/aodh/templates/pod-aodh-test.yaml b/aodh/templates/pod-aodh-test.yaml index 6e627b83f7..dc4b816d0b 100644 --- a/aodh/templates/pod-aodh-test.yaml +++ b/aodh/templates/pod-aodh-test.yaml @@ -36,6 +36,9 @@ spec: restartPolicy: Never nodeSelector: {{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }} +{{ if $envAll.Values.pod.tolerations.aodh.enabled }} +{{ tuple $envAll "aodh" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }} +{{ end }} serviceAccountName: {{ $serviceAccountName }} initContainers: {{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} diff --git a/aodh/values.yaml b/aodh/values.yaml index 6ed0434cb4..c584d10f7f 100644 --- a/aodh/values.yaml +++ b/aodh/values.yaml @@ -98,6 +98,13 @@ pod: default: kubernetes.io/hostname weight: default: 10 + tolerations: + aodh: + enabled: false + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule mounts: aodh_api: init_container: null diff --git a/releasenotes/notes/aodh.yaml b/releasenotes/notes/aodh.yaml index 6e8cff8d12..13ddbc1c4e 100644 --- a/releasenotes/notes/aodh.yaml +++ b/releasenotes/notes/aodh.yaml @@ -5,4 +5,5 @@ aodh: - 0.2.0 Remove support for releases before T - 0.2.1 Use policies in yaml format - 0.2.2 Update htk requirements repo + - 0.2.3 Enable taint toleration for Openstack services ...