fc68439414
Currently, all of the stx-openstack services have the replica count set to the number of the controllers. If one of the controllers is locked their replicas number will still be 2 which is incorrect. We solve this by changing the number of replicas to be equal to the number of the active controllers. The rabbitmq and mariadb services cannot use this approach because they are unable to work properly if their replica number is decreased from 2 to 1. So a kubernetes toleration is used here to allow the rabbitmq and mariadb pods to be deployed on the locked controller. Change-Id: I15cf2a3f62525751435ddbe66760935f3ab21d2b Closes-Bug: 1879018 Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From c8f3a96fad3344cfdb058c7c0fee77431f77a001 Mon Sep 17 00:00:00 2001
|
|
From: Mihnea Saracin <Mihnea.Saracin@windriver.com>
|
|
Date: Wed, 22 Jul 2020 15:53:25 +0300
|
|
Subject: [PATCH] Add tolerations to rabbitmq chart
|
|
|
|
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
|
|
---
|
|
rabbitmq/templates/statefulset.yaml | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml
|
|
index 9e40a103..cf5d1811 100644
|
|
--- a/rabbitmq/templates/statefulset.yaml
|
|
+++ b/rabbitmq/templates/statefulset.yaml
|
|
@@ -85,6 +85,8 @@ spec:
|
|
{{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
nodeSelector:
|
|
{{ $envAll.Values.labels.server.node_selector_key }}: {{ $envAll.Values.labels.server.node_selector_value | quote }}
|
|
+ tolerations:
|
|
+{{ toYaml .Values.tolerations | indent 8 }}
|
|
initContainers:
|
|
{{ tuple $envAll "rabbitmq" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
- name: rabbitmq-password
|
|
--
|
|
2.17.1
|
|
|