Enable taint toleration for aodh

This changes use the helm-toolkit template for toleration
in openstack services

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Story: 2009276
Task: 43531
Depends-On: I168837f962465d1c89acc511b7bf4064ac4b546c
Change-Id: Ic5de545de70112bcc16cf353163a110b70874967
This commit is contained in:
Thiago Brito 2022-03-22 15:34:54 -03:00 committed by Thiago Paiva Brito
parent 151c03d5ec
commit 423c6b34ff
18 changed files with 54 additions and 1 deletions

View File

@ -16,7 +16,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: Openstack-Helm Aodh description: Openstack-Helm Aodh
name: aodh name: aodh
version: 0.2.2 version: 0.2.3
home: https://docs.openstack.org/aodh/latest/ home: https://docs.openstack.org/aodh/latest/
sources: sources:
- https://opendev.org/openstack/aodh - https://opendev.org/openstack/aodh

View File

@ -48,6 +48,9 @@ spec:
restartPolicy: OnFailure restartPolicy: OnFailure
nodeSelector: nodeSelector:
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} {{ .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: initContainers:
{{ tuple $envAll "alarms_cleaner" $mounts_aodh_alarms_cleaner_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }} {{ tuple $envAll "alarms_cleaner" $mounts_aodh_alarms_cleaner_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
containers: containers:

View File

@ -52,6 +52,9 @@ spec:
{{ tuple $envAll "aodh" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} {{ tuple $envAll "aodh" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }} {{ .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" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll "api" $mounts_aodh_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "api" $mounts_aodh_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -52,6 +52,9 @@ spec:
{{ tuple $envAll "aodh" "evaluator" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} {{ tuple $envAll "aodh" "evaluator" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.evaluator.node_selector_key }}: {{ .Values.labels.evaluator.node_selector_value }} {{ .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: initContainers:
{{ tuple $envAll "evaluator" $mounts_aodh_evaluator_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "evaluator" $mounts_aodh_evaluator_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:

View File

@ -52,6 +52,9 @@ spec:
{{ tuple $envAll "aodh" "listener" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} {{ tuple $envAll "aodh" "listener" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.listener.node_selector_key }}: {{ .Values.labels.listener.node_selector_value }} {{ .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: initContainers:
{{ tuple $envAll "listener" $mounts_aodh_listener_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "listener" $mounts_aodh_listener_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:

View File

@ -52,6 +52,9 @@ spec:
{{ tuple $envAll "aodh" "notifier" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} {{ tuple $envAll "aodh" "notifier" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.notifier.node_selector_key }}: {{ .Values.labels.notifier.node_selector_value }} {{ .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: initContainers:
{{ tuple $envAll "notifier" $mounts_aodh_notifier_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "notifier" $mounts_aodh_notifier_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }} {{- if and .Values.manifests.job_bootstrap .Values.bootstrap.enabled }}
{{- $bootstrapJob := dict "envAll" . "serviceName" "aodh" "keystoneUser" .Values.bootstrap.ks_user -}} {{- $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" }} {{ $bootstrapJob | include "helm-toolkit.manifests.job_bootstrap" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if .Values.manifests.job_db_drop }} {{- if .Values.manifests.job_db_drop }}
{{- $dbDropJob := dict "envAll" . "serviceName" "aodh" -}} {{- $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" }} {{ $dbDropJob | include "helm-toolkit.manifests.job_db_drop_mysql" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if .Values.manifests.job_db_init }} {{- if .Values.manifests.job_db_init }}
{{- $dbInitJob := dict "envAll" . "serviceName" "aodh" -}} {{- $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" }} {{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
{{- end }} {{- end }}

View File

@ -17,5 +17,8 @@ limitations under the License.
{{- if .Values.manifests.job_db_sync }} {{- if .Values.manifests.job_db_sync }}
{{- $dbSyncJob := dict "envAll" . "serviceName" "aodh" -}} {{- $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 -}} {{- $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" }} {{ $dbSyncJob | include "helm-toolkit.manifests.job_db_sync" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }} {{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "aodh" -}} {{- $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" }} {{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if .Values.manifests.job_ks_endpoints }} {{- if .Values.manifests.job_ks_endpoints }}
{{- $ksServiceJob := dict "envAll" . "serviceName" "aodh" "serviceTypes" ( tuple "alarming" ) -}} {{- $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" }} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_endpoints" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if .Values.manifests.job_ks_service }} {{- if .Values.manifests.job_ks_service }}
{{- $ksServiceJob := dict "envAll" . "serviceName" "aodh" "serviceTypes" ( tuple "alarming" ) -}} {{- $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" }} {{ $ksServiceJob | include "helm-toolkit.manifests.job_ks_service" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if .Values.manifests.job_ks_user }} {{- if .Values.manifests.job_ks_user }}
{{- $ksUserJob := dict "envAll" . "serviceName" "aodh" -}} {{- $ksUserJob := dict "envAll" . "serviceName" "aodh" -}}
{{- if .Values.pod.tolerations.aodh.enabled -}}
{{- $_ := set $ksUserJob "tolerationsEnabled" true -}}
{{- end -}}
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }} {{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
{{- end }} {{- end }}

View File

@ -16,5 +16,8 @@ limitations under the License.
{{- if .Values.manifests.job_rabbit_init }} {{- if .Values.manifests.job_rabbit_init }}
{{- $rmqUserJob := dict "envAll" . "serviceName" "aodh" -}} {{- $rmqUserJob := dict "envAll" . "serviceName" "aodh" -}}
{{- if .Values.pod.tolerations.aodh.enabled -}}
{{- $_ := set $rmqUserJob "tolerationsEnabled" true -}}
{{- end -}}
{{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }} {{ $rmqUserJob | include "helm-toolkit.manifests.job_rabbit_init" }}
{{- end }} {{- end }}

View File

@ -36,6 +36,9 @@ spec:
restartPolicy: Never restartPolicy: Never
nodeSelector: nodeSelector:
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }} {{ .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 }} serviceAccountName: {{ $serviceAccountName }}
initContainers: initContainers:
{{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} {{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}

View File

@ -98,6 +98,13 @@ pod:
default: kubernetes.io/hostname default: kubernetes.io/hostname
weight: weight:
default: 10 default: 10
tolerations:
aodh:
enabled: false
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
mounts: mounts:
aodh_api: aodh_api:
init_container: null init_container: null

View File

@ -5,4 +5,5 @@ aodh:
- 0.2.0 Remove support for releases before T - 0.2.0 Remove support for releases before T
- 0.2.1 Use policies in yaml format - 0.2.1 Use policies in yaml format
- 0.2.2 Update htk requirements repo - 0.2.2 Update htk requirements repo
- 0.2.3 Enable taint toleration for Openstack services
... ...