Enable taint toleration for rabbitmq

This adds taint toleration support for openstack jobs

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I1c731c94e58895bd8bfc26d4300aac40a9111f12
This commit is contained in:
Thiago Brito 2022-03-22 15:09:23 -03:00
parent b5c285ae98
commit 7f76a519d4
7 changed files with 21 additions and 1 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v3.7.26
description: OpenStack-Helm RabbitMQ
name: rabbitmq
version: 0.1.18
version: 0.1.19
home: https://github.com/rabbitmq/rabbitmq-server
...

View File

@ -50,6 +50,9 @@ spec:
{{ dict "envAll" $envAll "application" "cluster_wait" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure
{{ if $envAll.Values.pod.tolerations.rabbitmq.enabled }}
{{ tuple $envAll "rabbitmq" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
{{ end }}
nodeSelector:
{{ $envAll.Values.labels.jobs.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }}
initContainers:

View File

@ -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" "rabbitmq" -}}
{{- if .Values.pod.tolerations.rabbitmq.enabled -}}
{{- $_ := set $imageRepoSyncJob "tolerationsEnabled" true -}}
{{- end -}}
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
{{- end }}

View File

@ -42,6 +42,9 @@ metadata:
spec:
{{ dict "envAll" $envAll "application" "test" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 2 }}
serviceAccountName: {{ $serviceAccountName }}
{{ if $envAll.Values.pod.tolerations.rabbitmq.enabled }}
{{ tuple $envAll "rabbitmq" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 2 }}
{{ end }}
nodeSelector:
{{ $envAll.Values.labels.test.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }}
restartPolicy: Never

View File

@ -103,6 +103,9 @@ spec:
serviceAccountName: {{ $rcControllerName | quote }}
affinity:
{{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
{{ if $envAll.Values.pod.tolerations.rabbitmq.enabled }}
{{ tuple $envAll "rabbitmq" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}
{{ end }}
nodeSelector:
{{ $envAll.Values.labels.server.node_selector_key }}: {{ $envAll.Values.labels.server.node_selector_value | quote }}
initContainers:

View File

@ -118,6 +118,13 @@ pod:
default: kubernetes.io/hostname
weight:
default: 10
tolerations:
rabbitmq:
enabled: false
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
replicas:
server: 2
prometheus_rabbitmq_exporter: 1

View File

@ -18,4 +18,5 @@ rabbitmq:
- 0.1.16 Add force_boot command to rabbit start template
- 0.1.17 Updated naming for subchart compatibility
- 0.1.18 Revert naming for subchart compatibility
- 0.1.19 Enable taint toleration for Openstack services jobs
...