From 5fe9b5c3164062224cc2b0bf52364189d9b8fa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=BA=E9=98=B3?= Date: Sat, 5 Nov 2022 18:20:03 +0800 Subject: [PATCH] fix and enhance helm db config (#12707) --- deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl | 4 ++-- deploy/kubernetes/dolphinscheduler/values.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl b/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl index a3eb2f37ba..0f36875d56 100644 --- a/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl +++ b/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl @@ -139,9 +139,9 @@ Create a database environment variables. {{- end }} - name: SPRING_DATASOURCE_URL {{- if .Values.postgresql.enabled }} - value: jdbc:postgresql://{{ template "dolphinscheduler.postgresql.fullname" . }}:5432/{{ .Values.postgresql.postgresqlDatabase }}?characterEncoding=utf8 + value: jdbc:postgresql://{{ template "dolphinscheduler.postgresql.fullname" . }}:5432/{{ .Values.postgresql.postgresqlDatabase }}?{{ .Values.postgresql.params }} {{- else if .Values.mysql.enabled }} - value: jdbc:mysql://{{ template "dolphinscheduler.mysql.fullname" . }}:3306/{{ .Values.postgresql.postgresqlDatabase }}?characterEncoding=utf8 + value: jdbc:mysql://{{ template "dolphinscheduler.mysql.fullname" . }}:3306/{{ .Values.mysql.auth.database }}?{{ .Values.mysql.auth.params }} {{- else }} value: jdbc:{{ .Values.externalDatabase.type }}://{{ .Values.externalDatabase.host }}:{{ .Values.externalDatabase.port }}/{{ .Values.externalDatabase.database }}?{{ .Values.externalDatabase.params }} {{- end }} diff --git a/deploy/kubernetes/dolphinscheduler/values.yaml b/deploy/kubernetes/dolphinscheduler/values.yaml index ac75029ab6..2f5184d4b8 100644 --- a/deploy/kubernetes/dolphinscheduler/values.yaml +++ b/deploy/kubernetes/dolphinscheduler/values.yaml @@ -38,6 +38,7 @@ postgresql: postgresqlUsername: "root" postgresqlPassword: "root" postgresqlDatabase: "dolphinscheduler" + params: "characterEncoding=utf8" persistence: enabled: false size: "20Gi" @@ -49,6 +50,7 @@ mysql: username: "ds" password: "ds" database: "dolphinscheduler" + params: "characterEncoding=utf8" primary: persistence: enabled: false