aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2020-05-15 16:37:31 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-15 16:37:31 +0000
commit45fa2a95f9886659030955ccf5b5441bfd179de4 (patch)
tree9e3f84e270bc396eb5c63cca9d44d8b7a44e4c71
parent8bca634df4cf29dc053a6a6a6a42b6d06d5d69e9 (diff)
parent031bdb7e4d16288782797ff97333842e6a3f9623 (diff)
Merge "Update processor-db config with correct configuration"
-rwxr-xr-xkubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties6
-rwxr-xr-xkubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml9
-rwxr-xr-xkubernetes/cds/charts/cds-blueprints-processor/values.yaml12
-rw-r--r--kubernetes/cds/values.yaml7
4 files changed, 17 insertions, 17 deletions
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties b/kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties
index 94f3466d9d..05ac61cf57 100755
--- a/kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties
+++ b/kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties
@@ -53,9 +53,9 @@ blueprintsprocessor.db.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialec
# processor-db endpoint
blueprintsprocessor.db.processor-db.type=maria-db
-blueprintsprocessor.db.processor-db.url=jdbc:mysql://{{.Values.config.cdsDB.dbServer}}:{{.Values.config.cdsDB.dbPort}}/{{.Values.config.cdsDB.dbName}}
-blueprintsprocessor.db.processor-db.username=root
-blueprintsprocessor.db.processor-db.password=${CDS_DB_ROOT_PASSWORD}
+blueprintsprocessor.db.processor-db.url=jdbc:mysql://{{ .Values.config.sdncDB.dbService }}:{{ .Values.config.sdncDB.dbPort }}/{{.Values.config.sdncDB.dbName}}
+blueprintsprocessor.db.processor-db.username=${SDNC_DB_USERNAME}
+blueprintsprocessor.db.processor-db.password=${SDNC_DB_PASSWORD}
# Python executor
blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml b/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
index ac0e9c5f80..161cf28d27 100755
--- a/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
+++ b/kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml
@@ -48,15 +48,16 @@ spec:
- sh
args:
- -c
- - "cd /config-input && for PFILE in `ls -1 .`; do envsubst '${CDS_DB_USERNAME},${CDS_DB_PASSWORD},${CDS_DB_ROOT_PASSWORD}' <${PFILE} >/config/${PFILE}; done"
+ - "cd /config-input && for PFILE in `ls -1 .`; do envsubst '${CDS_DB_USERNAME},${CDS_DB_PASSWORD},${SDNC_DB_USERNAME},${SDNC_DB_PASSWORD}' <${PFILE} >/config/${PFILE}; done"
env:
- name: CDS_DB_USERNAME
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
- name: CDS_DB_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
- - name: CDS_DB_ROOT_PASSWORD
- {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-root-pass" "key" "password") | indent 10}}
-
+ - name: SDNC_DB_USERNAME
+ value: root
+ - name: SDNC_DB_PASSWORD
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
volumeMounts:
- mountPath: /config-input/application.properties
name: {{ include "common.fullname" . }}-config
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/values.yaml b/kubernetes/cds/charts/cds-blueprints-processor/values.yaml
index f120f12072..a14dbad99b 100755
--- a/kubernetes/cds/charts/cds-blueprints-processor/values.yaml
+++ b/kubernetes/cds/charts/cds-blueprints-processor/values.yaml
@@ -51,10 +51,10 @@ secrets:
login: '{{ .Values.config.cdsDB.dbUser }}'
password: '{{ .Values.config.cdsDB.dbPassword }}'
passwordPolicy: required
- - uid: 'cds-db-root-pass'
+ - uid: 'sdnc-db-root-pass'
type: password
- externalSecret: '{{ tpl (default "" .Values.config.cdsDB.dbRootPassExternalSecret) . }}'
- password: '{{ .Values.config.cdsDB.dbRootPassword }}'
+ externalSecret: '{{ tpl (default "" .Values.config.sdncDB.dbRootPassExternalSecret) . }}'
+ password: '{{ .Values.config.sdncDB.dbRootPass }}'
passwordPolicy: required
#################################################################
@@ -72,6 +72,12 @@ debugEnabled: false
config:
appConfigDir: /opt/app/onap/config
useScriptCompileCache: true
+ sdncDB:
+ dbService: mariadb-galera
+ dbPort: 3306
+ dbName: sdnctl
+ #dbRootPass: Custom root password
+ dbRootPassExternalSecret: '{{ include "common.mariadb.secret.rootPassSecretName" ( dict "dot" . "chartName" .Values.config.sdncDB.dbService ) }}'
cdsDB:
dbServer: cds-db
dbPort: 3306
diff --git a/kubernetes/cds/values.yaml b/kubernetes/cds/values.yaml
index 1ead35e234..d04c22beb0 100644
--- a/kubernetes/cds/values.yaml
+++ b/kubernetes/cds/values.yaml
@@ -38,11 +38,6 @@ secrets:
externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "config" "userCredentialsExternalSecret")) .) (hasSuffix "cds-db-secret" (index .Values "mariadb-galera" "config" "userCredentialsExternalSecret"))}}'
login: '{{ index .Values "mariadb-galera" "config" "userName" }}'
password: '{{ index .Values "mariadb-galera" "config" "userPassword" }}'
- - name: &dbRootPasswordSecretName '{{ include "common.release" . }}-cds-db-root-pass'
- uid: 'cds-db-root-pass'
- type: password
- externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "config" "mariadbRootPasswordExternalSecret")) .) (hasSuffix "cds-db-root-pass" (index .Values "mariadb-galera" "config" "mariadbRootPasswordExternalSecret"))}}'
- password: '{{ index .Values "mariadb-galera" "config" "mariadbRootPassword" }}'
#################################################################
# Application configuration defaults.
@@ -86,7 +81,6 @@ mariadb-galera:
userName: sdnctl
# userPassword: sdnctl
userCredentialsExternalSecret: *dbUserSecretName
- mariadbRootPasswordExternalSecret: *dbRootPasswordSecretName
mysqlDatabase: &mysqlDbName sdnctl
nameOverride: &dbServer cds-db
service:
@@ -104,7 +98,6 @@ cds-blueprints-processor:
dbPort: 3306
dbName: *mysqlDbName
dbCredsExternalSecret: *dbUserSecretName
- dbRootPassExternalSecret: *dbRootPasswordSecretName
#Resource Limit flavor -By Default using small
flavor: small