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: