Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / so / values.yaml
index c252938..0d53ea3 100755 (executable)
@@ -1,6 +1,7 @@
 # Copyright © 2018 AT&T USA
 # Copyright © 2020 Huawei
 # Copyright © 2021 Orange
+# Copyright © 2024 Deutsche Telekom Intellectual Property. All rights reserved.
 # Modifications Copyright © 2023 Nordix Foundation
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,15 +22,17 @@ global:
   nodePortPrefixExt: 304
   centralizedLoggingEnabled: true
   mariadbGalera:
+    # flag to enable the DB creation via mariadb-operator
+    useOperator: true
     nameOverride: mariadb-galera
     servicePort: '3306'
     service: mariadb-galera
     internalPort: '3306'
-    # mariadbRootPassword: secretpassword
-    # rootPasswordExternalSecret: some secret
-    #This flag allows SO to instantiate its own mariadb-galera cluster,
-    #serviceName and nameOverride should be so-mariadb-galera if this flag is enabled
+    # This flag allows SO to instantiate its own mariadb-galera cluster,
+    # serviceName and nameOverride should be so-mariadb-galera if this flag is enabled
     localCluster: false
+    # (optional) if localCluster=false and an external secret is used set this variable
+    #userRootSecret: <secretName>
   persistence:
     mountPath: /dockerdata-nfs
   #This configuration specifies Service and port for SDNC OAM interface
@@ -62,11 +65,24 @@ secrets:
   - uid: db-root-pass
     name: &dbRootPassSecretName '{{ include "common.release" . }}-so-db-root-pass'
     type: password
-    externalSecret: '{{ .Values.global.mariadbGalera.localCluster | ternary
-      .Values.global.mariadbGalera.rootPasswordExternalSecret
-      (default (include "common.mariadb.secret.rootPassSecretName"
-        (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride))
-        .Values.global.mariadbGalera.rootPasswordExternalSecret)  }}'
+    # If we're using shared mariadb, we need to use the secret name (second
+    # part).
+    # If not, we do the same trick than for user db secret hat allows you
+    # override this secret using external one with the same field that is used
+    # to pass this to subchart.
+    externalSecret: '{{ .Values.global.mariadbGalera.localCluster |
+      ternary (( hasSuffix "so-db-root-pass" (index .Values "mariadb-galera" "rootUser" "externalSecret")) |
+               ternary
+                  ""
+                  (tpl (default "" (index .Values "mariadb-galera" "rootUser" "externalSecret")) .)
+               )
+               ( (not (empty (default "" .Values.global.mariadbGalera.userRootSecret))) |
+                 ternary
+                   .Values.global.mariadbGalera.userRootSecret
+                   (include "common.mariadb.secret.rootPassSecretName"
+                     (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)
+                   )
+               ) }}'
     password: '{{ .Values.global.mariadbGalera.mariadbRootpassword }}'
   - uid: db-backup-creds
     name: &dbBackupCredsSecretName '{{ include "common.release" . }}-so-db-backup-creds'
@@ -549,18 +565,18 @@ flavor: small
 resources:
   small:
     limits:
-      cpu: 1
-      memory: 4Gi
+      cpu: "1"
+      memory: "4Gi"
     requests:
-      cpu: 0.5
-      memory: 1Gi
+      cpu: "0.5"
+      memory: "1Gi"
   large:
     limits:
-      cpu: 2
-      memory: 8Gi
+      cpu: "2"
+      memory: "8Gi"
     requests:
-      cpu: 1
-      memory: 2Gi
+      cpu: "1"
+      memory: "2Gi"
   unlimited: {}
 
 nodeSelector: {}
@@ -578,11 +594,15 @@ config:
 #                                                       --set so.global.mariadbGalera.localCluster=true \
 #                                                       --set so.global.mariadbGalera.nameOverride=so-mariadb-galera \
 #                                                       --set so.global.mariadbGalera.serviceName=so-mariadb-galera
-mariadb-galera:
+mariadb-galera: &mariadbGalera
   rootUser:
     externalSecret: *dbRootPassSecretName
   nameOverride: &so-mariadb so-mariadb-galera
   replicaCount: 1
+  service:
+    name: *so-mariadb
+    portName: *so-mariadb
+    internalPort: 3306
   mariadbOperator:
     galera:
       enabled: false
@@ -633,17 +653,23 @@ mso:
     auth: basic bXNvX2FkbWlufHBhc3N3b3JkMSQ=
 
 so-bpmn-infra:
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
   logConfigMapNamePrefix: '{{ include "common.release" . }}-so'
 
 so-catalog-db-adapter:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
 
 so-cnf-adapter:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
   server:
@@ -654,24 +680,41 @@ so-cnf-adapter:
 
 so-cnfm-lcm:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
 
 so-etsi-nfvo-ns-lcm:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
 
 so-mariadb:
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     rootPasswordExternalSecretLocalDb: *dbRootPassSecretName
-    rootPasswordExternalSecret: '{{ ternary .Values.db.rootPasswordExternalSecretLocalDb (include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)) .Values.global.mariadbGalera.localCluster }}'
+    #rootPasswordExternalSecretLocalDb: *dbRootPassSecretName
+    rootPasswordExternalSecret: '{{ .Values.global.mariadbGalera.localCluster |
+      ternary (tpl .Values.db.rootPasswordExternalSecretLocalDb .)
+               ( (not (empty (default "" .Values.global.mariadbGalera.userRootSecret))) |
+                 ternary
+                   .Values.global.mariadbGalera.userRootSecret
+                   (include "common.mariadb.secret.rootPassSecretName"
+                     (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)
+                   )
+               ) }}'
     backupCredsExternalSecret: *dbBackupCredsSecretName
     userCredsExternalSecret: *dbUserCredsSecretName
     adminCredsExternalSecret: *dbAdminCredsSecretName
 
 so-admin-cockpit:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
 
@@ -680,11 +723,15 @@ so-nssmf-adapter:
   server:
     actuatorCredsExternalSecret: *actuator-secrets
     bpelCredsExternalSecret: *bpel-secrets
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
 
 so-oof-adapter:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
   mso:
@@ -696,21 +743,29 @@ so-oof-adapter:
 
 so-openstack-adapter:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
   logConfigMapNamePrefix: '{{ include "common.release" . }}-so'
 
 so-request-db-adapter:
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
 
 so-sdc-controller:
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
   logConfigMapNamePrefix: '{{ include "common.release" . }}-so'
 
 so-sdnc-adapter:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets
   mso:
@@ -722,6 +777,8 @@ so-ve-vnfm-adapter:
 
 so-etsi-sol005-adapter:
   enabled: true
+  mariadb-galera:
+    <<: *mariadbGalera
   db:
     <<: *dbSecrets