[MARIADB][POLICY] Correct the MariaDB ReadinessCheck 03/137703/3
authorAndreas Geissler <andreas-geissler@telekom.de>
Wed, 17 Apr 2024 07:42:16 +0000 (09:42 +0200)
committerAndreas Geissler <andreas-geissler@telekom.de>
Wed, 17 Apr 2024 12:58:50 +0000 (14:58 +0200)
The configuration of an external MariaDB did not fit with
the template function of _mariadb.tpl and additionally
the template function has a bug in the service information.

Issue-ID: OOM-3290

Change-Id: I92f758647012ebf289549665f7f5c20e94c9ff66
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
kubernetes/common/common/templates/_mariadb.tpl
kubernetes/policy/values.yaml

index 41259b3..3092298 100644 (file)
     {{- 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 -}}
 
index f01160f..9497c3c 100755 (executable)
@@ -29,10 +29,9 @@ global:
     # with '*mariadbConfig' pointer.
     config: &mariadbConfig
       mysqlDatabase: policyadmin
-    service: &mariadbService
-      name: &policy-mariadb policy-mariadb
-      internalPort: 3306
-    nameOverride: *policy-mariadb
+    service: &mariadbService policy-mariadb
+    internalPort: 3306
+    nameOverride: *mariadbService
     # (optional) if localCluster=false and an external secret is used set this variable
     #userRootSecret: <secretName>
   prometheusEnabled: false
@@ -232,9 +231,10 @@ mariadb-galera:
     name: &mysqlDbName policyadmin
   rootUser:
     externalSecret: *dbRootPassSecretName
-  nameOverride: *policy-mariadb
+  nameOverride: *mariadbService
   # mariadb-galera.service and global.mariadbGalera.service must be equals
-  service: *mariadbService
+  service:
+    name: *mariadbService
   replicaCount: 1
   mariadbOperator:
     galera:
@@ -243,7 +243,7 @@ mariadb-galera:
     enabled: true
     mountSubPath: policy/maria/data
   serviceAccount:
-    nameOverride: *policy-mariadb
+    nameOverride: *mariadbService
 
 postgresImage: library/postgres:latest
 # application configuration override for postgres