Fix comparison error with mariadb and helm v3

The mariadb chart currently fails to deploy due to
differences in handling comparison between helm v2
and v3. This change updates the comparison to work
in both versions.

Change-Id: I9143a16f3011c0c0ae5420e6ec41ad7745a28cab
This commit is contained in:
Gage Hugo 2022-03-18 17:13:20 -05:00
parent 848f392b3a
commit a1bd832b0f
3 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v10.2.31
description: OpenStack-Helm MariaDB
name: mariadb
version: 0.2.13
version: 0.2.14
home: https://mariadb.com/kb/en/
icon: http://badges.mariadb.org/mariadb-badge-180x60.png
sources:

View File

@ -36,7 +36,8 @@ mysql_status_query () {
if ! $MYSQL -e 'select 1' > /dev/null 2>&1 ; then
exit 1
fi
{{- if gt .Values.pod.replicas.server 1.0 }}
{{- if gt (int .Values.pod.replicas.server) 1 }}
if [ "x$(mysql_status_query wsrep_ready)" != "xON" ]; then
# WSREP says the node can receive queries
exit 1
@ -56,4 +57,4 @@ if [ "x$(mysql_status_query wsrep_local_state_comment)" != "xSynced" ]; then
# WSREP not synced
exit 1
fi
{{- end }}
{{- end }}

View File

@ -29,4 +29,5 @@ mariadb:
- 0.2.11 Enhance mariadb backup
- 0.2.12 Remove set -x
- 0.2.13 Adjust readiness.sh in single node and no replication case
- 0.2.14 Fix comparison value
...