Browse Source
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 service cannot use this approach because it is unable to work properly if its replicas number is decreasaed from 2 to 1. So a kubernetes toleration is used here to allow the second rabbitmq pod to be deployed on the locked controller. Change-Id: Ie979c7b5f2755ad673bd180e38b68e0d53c5f9b2 Closes-Bug: 1879018 Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>changes/79/742679/1
21 changed files with 70 additions and 38 deletions
@ -0,0 +1,26 @@
|
||||
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
|
||||
|
Loading…
Reference in new issue