diff options
Diffstat (limited to 'kubernetes/dmaap/components/dmaap-dr-prov')
5 files changed, 54 insertions, 13 deletions
diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml index f67b1cf380..dba613c33c 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml @@ -397,7 +397,7 @@ - <root level="INFO"> + <root level="{{.Values.config.dmaapDrProv.logLevel}}"> <appender-ref ref="asyncEELF" /> <appender-ref ref="asyncEELFError" /> <appender-ref ref="asyncEELFjettylog" /> diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties index 34662ae9e3..b6723117a3 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties @@ -7,9 +7,9 @@ # * Licensed under the Apache License, Version 2.0 (the "License"); # * you may not use this file except in compliance with the License. # * You may obtain a copy of the License at -# * +# * # * http://www.apache.org/licenses/LICENSE-2.0 -# * +# * # * Unless required by applicable law or agreed to in writing, software # * distributed under the License is distributed on an "AS IS" BASIS, # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,9 +40,9 @@ org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false # Database access org.onap.dmaap.datarouter.db.driver = org.mariadb.jdbc.Driver -org.onap.dmaap.datarouter.db.url = jdbc:mariadb://{{.Values.config.dmaapDrDb.mariadbServiceName}}:{{.Values.config.dmaapDrDb.mariadbServicePort}}/datarouter -org.onap.dmaap.datarouter.db.login = datarouter -org.onap.dmaap.datarouter.db.password = datarouter +org.onap.dmaap.datarouter.db.url = jdbc:mariadb://{{.Values.config.dmaapDrDb.mariadbServiceName}}:{{.Values.config.dmaapDrDb.mariadbServicePort}}/{{.Values.mariadb.config.mysqlDatabase}} +org.onap.dmaap.datarouter.db.login = ${DB_USERNAME} +org.onap.dmaap.datarouter.db.password = ${DB_PASSWORD} # PROV - DEFAULT ENABLED TLS PROTOCOLS org.onap.dmaap.datarouter.provserver.https.include.protocols = TLSv1.1|TLSv1.2 @@ -55,4 +55,3 @@ org.onap.dmaap.datarouter.provserver.aaf.sub.type = org.onap.dmaap-dr.su org.onap.dmaap.datarouter.provserver.aaf.instance = legacy org.onap.dmaap.datarouter.provserver.aaf.action.publish = publish org.onap.dmaap.datarouter.provserver.aaf.action.subscribe = subscribe - diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml index 4eb0888712..adbdb688c2 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml @@ -54,6 +54,10 @@ spec: args: - --container-name - aaf-locate + - --container-name + - aaf-cm + - --container-name + - aaf-service env: - name: NAMESPACE valueFrom: @@ -116,6 +120,11 @@ spec: port: {{ .Values.config.dmaapDrProv.internalPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: DB_USERNAME + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-secret" "key" "login") | indent 12 }} + - name: DB_PASSWORD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-secret" "key" "password") | indent 12 }} volumeMounts: {{- if .Values.global.aafEnabled }} - mountPath: {{ .Values.persistence.aafCredsPath }} diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/secret.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/secret.yaml new file mode 100644 index 0000000000..bd7eb8ea40 --- /dev/null +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/secret.yaml @@ -0,0 +1,15 @@ +# Copyright © 2020 Samsung Electronics +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{{ include "common.secretFast" . }} diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml index 80b15c7063..06f68e7ca9 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml @@ -18,12 +18,24 @@ global: nodePortPrefix: 302 loggingDirectory: /opt/app/datartr/logs + persistence: {} + +################################################################# +# Secrets metaconfig +################################################################# +secrets: + - uid: dmaap-dr-db-user-secret + name: '{{ include "common.release" . }}-dmaap-dr-db-user-secret' + type: basicAuth + externalSecret: '{{ tpl (default "" .Values.config.dmaapDrDb.userCredentialsExternalSecret) . }}' + login: '{{ .Values.config.dmaapDrDb.userName }}' + password: '{{ .Values.config.dmaapDrDb.userPassword }}' ################################################################# # Application configuration defaults. ################################################################# # application image -image: onap/dmaap/datarouter-prov:2.1.3 +image: onap/dmaap/datarouter-prov:2.1.5 pullPolicy: Always # flag to enable debugging - application support required @@ -52,6 +64,7 @@ readiness: ## Persist data to a persitent volume persistence: + enabled: true volumeReclaimPolicy: Retain accessMode: ReadWriteOnce mountPath: /dockerdata-nfs @@ -79,11 +92,18 @@ config: portName2: dr-prov-port2 nodePort: 59 nodePort2: 69 + # dr uses the EELF Logging framework https://github.com/att/EELF + # and supports the following log levels: TRACE, DEBUG, INFO, WARN, ERROR, OFF + logLevel: "INFO" + # dr-prov db configuration dmaapDrDb: mariadbServiceName: dmaap-dr-db-svc mariadbServicePort: 3306 mariadbContName: dmaap-dr-db + userName: datarouter +# userPassword: password +# userCredentialsExternalSecret: some secret # mariadb-galera configuration mariadb: @@ -91,9 +111,7 @@ mariadb: nameOverride: dmaap-dr-db replicaCount: 2 config: - mariadbRootPassword: datarouter - userName: datarouter - userPassword: datarouter + userCredentialsExternalSecret: '{{ include "common.release" . }}-dmaap-dr-db-user-secret' mysqlDatabase: datarouter service: name: dmaap-dr-db-svc @@ -106,7 +124,7 @@ mariadb: #AAF local config aafConfig: - aafDeployFqi: dmaap-dr@dmaap-dr.onap.org + aafDeployFqi: deployer@people.osaaf.org aafDeployPass: demo123456! fqdn: dmaap-dr-prov fqi: dmaap-dr-prov@dmaap-dr.onap.org @@ -132,4 +150,4 @@ resources: requests: cpu: 1000m memory: 2Gi - unlimited: {}
\ No newline at end of file + unlimited: {} |