[COMMON] Update MariaDB readinessChecks to fix Operator issues
[oom.git] / kubernetes / so / components / so-mariadb / values.yaml
index 4aa3229..6fdfd75 100755 (executable)
@@ -25,7 +25,9 @@ global:
   readinessImage: onap/oom/readiness:5.0.1
   ubuntuInitRepository: docker.io
   mariadbGalera:
-    nameOverride: &mariadbName mariadb-galera
+    # flag to enable the DB creation via mariadb-operator
+    useOperator: true
+    nameOverride: mariadb-galera
     service: mariadb-galera
     servicePort: "3306"
   migration:
@@ -35,11 +37,6 @@ global:
     dbUser: root
     dbPassword: secretpassword
 
-readinessCheck:
-  wait_for:
-    apps:
-      - *mariadbName
-
 #################################################################
 # Secrets metaconfig
 #################################################################
@@ -106,6 +103,15 @@ image: mariadb:10.1.38
 pullPolicy: Always
 ubuntuInitImage: oomk8s/ubuntu-init:2.0.0
 
+# Local mariadb galera instance default name
+mariadb-galera:
+  nameOverride: so-mariadb-galera
+  service:
+    internalPort: 3306
+  mariadbOperator:
+    galera:
+      enabled: false
+
 # db config
 db:
   rootPassword: secretpassword
@@ -157,18 +163,18 @@ flavor: small
 resources:
   small:
     limits:
-      cpu: 2
-      memory: 4Gi
+      cpu: "2"
+      memory: "4Gi"
     requests:
-      cpu: 1
-      memory: 2Gi
+      cpu: "1"
+      memory: "2Gi"
   large:
     limits:
-      cpu: 4
-      memory: 8Gi
+      cpu: "4"
+      memory: "8Gi"
     requests:
-      cpu: 2
-      memory: 4Gi
+      cpu: "2"
+      memory: "4Gi"
   unlimited: {}
 
 persistence:
@@ -201,3 +207,17 @@ serviceAccount:
 wait_for_job_container:
   containers:
     - '{{ include "common.name" . }}-config'
+
+readinessCheck:
+  wait_for_global_operator:
+    pods:
+      - '{{ .Values.global.mariadbGalera.nameOverride }}-0'
+  wait_for_local_operator:
+    pods:
+      - '{{ index .Values "mariadb-galera" "nameOverride" }}-0'
+  wait_for_global:
+    apps:
+      - '{{ include "common.mariadbAppName" . }}'
+  wait_for_local:
+    apps:
+      - '{{ include "common.mariadbAppName" . }}'