summaryrefslogtreecommitdiffstats
path: root/kubernetes/cds/charts
diff options
context:
space:
mode:
authorKonrad Bańka <k.banka@samsung.com>2020-05-14 16:56:39 +0200
committerYuriy Malakov <Yuriy.Malakov@att.com>2020-05-16 02:28:06 +0000
commit2d6d43871b8ca25ea7f396c3733395405d794e19 (patch)
treeafd78bc74ed2fe6e58e09f08870fea6b5cb2b43b /kubernetes/cds/charts
parent20d1facf59b65fec870715f2f55e5e1a5dd245ba (diff)
Update processor-db config with correct configuration
Processor-db configuration allows CDS to access data in sdnctl DB without enforcing users to provide such data in CBA. This entry is now corrected allowing proper work for this feature. Currently access to sdnctl DB is provided via root DB access, but this should be further corrected in future. Also removed unnecessary secret metaconfig - 'cds-db-root-pass'. Issue-ID: CCSDK-2373 Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: Idf452fe5d42862e507b2d981af58b96931ee287c (cherry picked from commit 031bdb7e4d16288782797ff97333842e6a3f9623)
Diffstat (limited to 'kubernetes/cds/charts')
-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
3 files changed, 17 insertions, 10 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