This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 0188f40b84 [Improvement][HELM] add driver-class-name (#14614)
0188f40b84 is described below

commit 0188f40b84b4c4dfbf66d3a834b860830e27f0a1
Author: Gallardot <[email protected]>
AuthorDate: Mon Jul 24 11:58:33 2023 +0800

    [Improvement][HELM] add driver-class-name (#14614)
    
    Signed-off-by: Gallardot <[email protected]>
    Co-authored-by: xiangzihao <[email protected]>
    Co-authored-by: Eric Gao <[email protected]>
---
 deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl | 8 ++++++++
 deploy/kubernetes/dolphinscheduler/values.yaml            | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl 
b/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl
index 3e68b07c16..d43662befd 100644
--- a/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl
+++ b/deploy/kubernetes/dolphinscheduler/templates/_helpers.tpl
@@ -175,6 +175,14 @@ Create a database environment variables.
       name: {{ include "dolphinscheduler.fullname" . }}-externaldb
       key: database-password
       {{- end }}
+- name: SPRING_DATASOURCE_DRIVER-CLASS-NAME
+  {{- if .Values.postgresql.enabled }}
+  value: {{ .Values.postgresql.driverClassName }}
+  {{- else if .Values.mysql.enabled }}
+  value: {{ .Values.mysql.driverClassName }}
+  {{- else }}
+  value: {{ .Values.externalDatabase.driverClassName | quote }}
+  {{- end }}
 {{- end -}}
 
 {{/*
diff --git a/deploy/kubernetes/dolphinscheduler/values.yaml 
b/deploy/kubernetes/dolphinscheduler/values.yaml
index c6f9ff8005..88048ca3c0 100644
--- a/deploy/kubernetes/dolphinscheduler/values.yaml
+++ b/deploy/kubernetes/dolphinscheduler/values.yaml
@@ -43,6 +43,7 @@ postgresql:
   postgresqlUsername: "root"
   postgresqlPassword: "root"
   postgresqlDatabase: "dolphinscheduler"
+  driverClassName: "org.postgresql.Driver"
   params: "characterEncoding=utf8"
   persistence:
     enabled: false
@@ -51,6 +52,7 @@ postgresql:
 
 mysql:
   enabled: false
+  driverClassName: "com.mysql.cj.jdbc.Driver"
   auth:
     username: "ds"
     password: "ds"
@@ -82,6 +84,7 @@ externalDatabase:
   password: "root"
   database: "dolphinscheduler"
   params: "characterEncoding=utf8"
+  driverClassName: "org.postgresql.Driver"
 
 ## If not exists external registry, the zookeeper registry will be used by 
default.
 zookeeper:

Reply via email to