From e383b3255e8c26f76d97dc33214c1e4f25c6aa6f Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Fri, 7 Feb 2020 15:49:54 +0100 Subject: [NBI] Don't hardcode mariadb-galera password Let's use common secret template to generate user credentials for NBI DB and depend on mariadb-galera to generate secure enough root password. BTW. Don't be surprised for now mariadb-galera has a hardcoded root password but as soon as we move all charts that use it to common secret template it will be auto generated. Issue-ID: OOM-2291 Signed-off-by: Krzysztof Opasiak Change-Id: I5d16f6c26aa63a46db98ba3dab3a76267b4049f1 --- kubernetes/nbi/templates/deployment.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'kubernetes/nbi/templates/deployment.yaml') diff --git a/kubernetes/nbi/templates/deployment.yaml b/kubernetes/nbi/templates/deployment.yaml index ceaf12b844..1fad1fc5aa 100644 --- a/kubernetes/nbi/templates/deployment.yaml +++ b/kubernetes/nbi/templates/deployment.yaml @@ -56,12 +56,9 @@ spec: - name: SPRING_DATASOURCE_URL value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "config" "mysqlDatabase" }} - name: SPRING_DATASOURCE_USERNAME - value: {{ index .Values "mariadb-galera" "config" "userName" }} + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }} - name: SPRING_DATASOURCE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "common.mariadbSecret" . }} - key: {{ include "common.mariadbSecretParam" . }} + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }} - name: SPRING_DATA_MONGODB_HOST value: {{ .Values.mongo.service.name }}.{{ include "common.namespace" . }} - name: SPRING_DATA_MONGODB_PORT -- cgit 1.2.3-korg