[HOLMES] Use common postgres for holmes 81/124781/10
authorAbdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Mon, 11 Oct 2021 09:56:08 +0000 (11:56 +0200)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 29 Oct 2021 14:08:00 +0000 (14:08 +0000)
Use common postgres for holmes

Issue-ID: OOM-2860
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Change-Id: I608c8b3e5c81c2a266ab259cb7e9be0c6cc5eb1f

kubernetes/holmes/requirements.yaml
kubernetes/holmes/values.yaml

index d1200fd..f881acd 100644 (file)
@@ -22,6 +22,11 @@ dependencies:
   - name: postgres
     version: ~9.x-0
     repository: '@local'
+    condition: global.postgres.localCluster
+  - name: postgres-init
+    version: ~9.x-0
+    repository: '@local'
+    condition: not global.postgres.localCluster
   - name: holmes-rule-mgmt
     version: ~9.x-0
     repository: 'file://components/holmes-rule-mgmt'
index 9c69c20..a536380 100644 (file)
 global:
   nodePortPrefix: 302
   consulLoaderImage: onap/org.onap.dcaegen2.deployments.consul-loader-container:1.0.0
-
+  #Service Names of the postgres db to connect to.
+  #Override it to dbc-pg if localCluster is enabled.
+  postgres:
+    localCluster: false
+    service:
+      name: pgset
+      name2: &postgres tcp-pgset-primary
+      name3: tcp-pgset-replica
+    container:
+      name: postgres
 secrets:
 - uid: pg-root-pass
   name: &pgRootPassSecretName '{{ include "common.release" . }}-holmes-pg-root-pass'
@@ -65,11 +74,23 @@ postgres:
     mountSubPath: holmes/data
     mountInitPath: holmes
 
+postgres-init:
+  nameOverride: holmes-postgres-init
+  config:
+    pgUserName: holmes
+    pgDatabase: *dbName
+    pgDataPath: data
+    pgUserExternalSecret: *pgUserCredsSecretName
+    # pgPrimaryPassword: password
+    # pgUserPassword: password
+    # pgRootPassword: password
+
 holmes-engine-mgmt:
   config:
     pgConfig:
       dbName: *dbName
-      dbHost: *dbHost
+      # dbHost: *dbHost
+      dbHost: *postgres
       dbPort: *dbPort
       dbUserCredsExternalSecret: *pgUserCredsSecretName
 
@@ -77,7 +98,8 @@ holmes-rule-mgmt:
   config:
     pgConfig:
       dbName: *dbName
-      dbHost: *dbHost
+      # dbHost: *dbHost
+      dbHost: *postgres
       dbPort: *dbPort
       dbUserCredsExternalSecret: *pgUserCredsSecretName