aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2023-10-24 15:38:01 +0200
committerAndreas Geissler <andreas-geissler@telekom.de>2023-10-24 15:49:57 +0200
commit576de2dd4f523e2a47e9c2d1063395dae4efc776 (patch)
tree2530eacf001c17bbce226c5abdf2c558681e0028 /kubernetes/common
parentfa2302b53d94406b2712b7ee4f24839f55f95a30 (diff)
[MARIADB] Make the MariaDB service Operator aware
To support both Operator and non-operator deployments the service name should be either mariadb-galera-primary or mariadb-galera Issue-ID: OOM-3236 Change-Id: Ic7721e08ec6a257b537024cb4a4751d6155ee28c Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Diffstat (limited to 'kubernetes/common')
-rw-r--r--kubernetes/common/common/templates/_mariadb.tpl8
-rw-r--r--kubernetes/common/network-name-gen/values.yaml2
2 files changed, 9 insertions, 1 deletions
diff --git a/kubernetes/common/common/templates/_mariadb.tpl b/kubernetes/common/common/templates/_mariadb.tpl
index 5e0aed587c..c90b86c3a4 100644
--- a/kubernetes/common/common/templates/_mariadb.tpl
+++ b/kubernetes/common/common/templates/_mariadb.tpl
@@ -74,9 +74,17 @@
*/}}
{{- define "common.mariadbService" -}}
{{- if .Values.global.mariadbGalera.localCluster -}}
+ {{- if .Values.global.mariadbGalera.useOperator }}
+ {{- printf "%s-primary" (index .Values "mariadb-galera" "nameOverride") -}}
+ {{- else }}
{{- index .Values "mariadb-galera" "nameOverride" -}}
+ {{- end }}
{{- else -}}
+ {{- if .Values.global.mariadbGalera.useOperator }}
+ {{- printf "%s-primary" (.Values.global.mariadbGalera.service) -}}
+ {{- else }}
{{- .Values.global.mariadbGalera.service -}}
+ {{- end }}
{{- end -}}
{{- end -}}
diff --git a/kubernetes/common/network-name-gen/values.yaml b/kubernetes/common/network-name-gen/values.yaml
index adfa468d6e..2ab9b93330 100644
--- a/kubernetes/common/network-name-gen/values.yaml
+++ b/kubernetes/common/network-name-gen/values.yaml
@@ -30,7 +30,7 @@ global:
#as the dependency check will not work otherwise (Chart.yaml)
localCluster: false
globalCluster: true
- service: mariadb-galera-primary
+ service: mariadb-galera
internalPort: 3306
nameOverride: mariadb-galera