openstack-armada-app/openstack-helm-infra/files/0015-Add-tolerations-to-mariadb-chart.patch
Mihnea Saracin fc68439414 Fix apply of stx-openstack when host is locked
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>
2020-09-11 18:46:52 +03:00

41 lines
1.7 KiB
Diff

From 7394d591310bf5342f3b66e4ee0a6a3cbd38c558 Mon Sep 17 00:00:00 2001
From: Mihnea Saracin <Mihnea.Saracin@windriver.com>
Date: Tue, 11 Aug 2020 10:52:15 +0300
Subject: [PATCH] Add tolerations to mariadb chart
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
---
mariadb/templates/deployment-ingress.yaml | 2 ++
mariadb/templates/statefulset.yaml | 2 ++
2 files changed, 4 insertions(+)
diff --git a/mariadb/templates/deployment-ingress.yaml b/mariadb/templates/deployment-ingress.yaml
index 72bea94a..9fb02c8d 100644
--- a/mariadb/templates/deployment-ingress.yaml
+++ b/mariadb/templates/deployment-ingress.yaml
@@ -147,6 +147,8 @@ spec:
nodeSelector:
{{ .Values.labels.ingress.node_selector_key }}: {{ .Values.labels.ingress.node_selector_value }}
terminationGracePeriodSeconds: 60
+ tolerations:
+{{ toYaml .Values.tolerations | indent 8 }}
initContainers:
{{ tuple $envAll "ingress" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers:
diff --git a/mariadb/templates/statefulset.yaml b/mariadb/templates/statefulset.yaml
index 7ccc219b..120427ae 100644
--- a/mariadb/templates/statefulset.yaml
+++ b/mariadb/templates/statefulset.yaml
@@ -108,6 +108,8 @@ spec:
{{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector:
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
+ tolerations:
+{{ toYaml .Values.tolerations | indent 8 }}
initContainers:
{{ tuple $envAll "mariadb" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{- if .Values.volume.chown_on_start }}
--
2.17.1