From a0983b68506b9330799648ad5766ddb6d460e3c7 Mon Sep 17 00:00:00 2001 From: Vlad Gusev Date: Mon, 16 Dec 2024 17:15:09 +0200 Subject: [PATCH] [pxc-db] Add simple check to prevent pxc cluster to be set bigger than 7 --- common/pxc-db/Chart.yaml | 2 +- common/pxc-db/templates/cluster.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/pxc-db/Chart.yaml b/common/pxc-db/Chart.yaml index 1f891091b1..86cd68fc1c 100644 --- a/common/pxc-db/Chart.yaml +++ b/common/pxc-db/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.20 +version: 0.1.21 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/common/pxc-db/templates/cluster.yaml b/common/pxc-db/templates/cluster.yaml index 5f2a8b7814..8836457f8d 100644 --- a/common/pxc-db/templates/cluster.yaml +++ b/common/pxc-db/templates/cluster.yaml @@ -60,6 +60,9 @@ spec: apply: disabled {{- $pxc := .Values.pxc }} pxc: + {{- if gt (int $pxc.size) 7 }} + {{- fail "The Galera cluster must not be bigger than 7 nodes" }} + {{- end }} size: {{ $pxc.size }} {{- if $pxc.image.override }} image: {{ $pxc.image.override }}