diff --git a/stable/spring-cloud-data-flow/Chart.yaml b/stable/spring-cloud-data-flow/Chart.yaml index 7d1b74d2f2..77f8fed97c 100644 --- a/stable/spring-cloud-data-flow/Chart.yaml +++ b/stable/spring-cloud-data-flow/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Toolkit for building data processing pipelines. name: spring-cloud-data-flow -version: 2.2.0 +version: 2.2.1 appVersion: 2.0.2.RELEASE home: http://cloud.spring.io/spring-cloud-dataflow/ sources: diff --git a/stable/spring-cloud-data-flow/README.md b/stable/spring-cloud-data-flow/README.md index c863285b71..fd39207b69 100644 --- a/stable/spring-cloud-data-flow/README.md +++ b/stable/spring-cloud-data-flow/README.md @@ -137,6 +137,7 @@ The following tables list the configurable parameters and their default values. | Parameter | Description | Default | | ------------------- | ------------------------------ | ------------------------- | | database.driver | Database driver | nil +| database.scheme | Database scheme | nil | database.host | Database host | nil | database.port | Database port | nil | database.user | Database user | scdf diff --git a/stable/spring-cloud-data-flow/templates/_helpers.tpl b/stable/spring-cloud-data-flow/templates/_helpers.tpl index db5508b7a3..6cff13dd3e 100644 --- a/stable/spring-cloud-data-flow/templates/_helpers.tpl +++ b/stable/spring-cloud-data-flow/templates/_helpers.tpl @@ -49,6 +49,14 @@ Create the name of the service account to use {{- end -}} {{- end -}} +{{- define "scdf.database.scheme" -}} + {{- if .Values.mysql.enabled -}} + {{- printf "mysql" -}} + {{- else -}} + {{- .Values.database.scheme -}} + {{- end -}} +{{- end -}} + {{- define "scdf.database.host" -}} {{- if .Values.mysql.enabled -}} {{- printf "${%s_MYSQL_SERVICE_HOST}" (include "scdf.envrelease" . ) -}} diff --git a/stable/spring-cloud-data-flow/templates/server-config.yaml b/stable/spring-cloud-data-flow/templates/server-config.yaml index ac8ef1b1a4..7dca7c1201 100644 --- a/stable/spring-cloud-data-flow/templates/server-config.yaml +++ b/stable/spring-cloud-data-flow/templates/server-config.yaml @@ -22,7 +22,7 @@ data: memory: {{ .Values.deployer.resourceLimits.memory }} cpu: {{ .Values.deployer.resourceLimits.cpu }} datasource: - url: 'jdbc:mysql://{{ template "scdf.database.host" . }}:{{ template "scdf.database.port" . }}/{{ template "scdf.database.dataflow" . }}' + url: 'jdbc:{{ template "scdf.database.scheme" . }}://{{ template "scdf.database.host" . }}:{{ template "scdf.database.port" . }}/{{ template "scdf.database.dataflow" . }}' driverClassName: {{ template "scdf.database.driver" . }} username: {{ template "scdf.database.user" . }} password: {{ template "scdf.database.password" . }} diff --git a/stable/spring-cloud-data-flow/templates/skipper-config.yaml b/stable/spring-cloud-data-flow/templates/skipper-config.yaml index 32ed34966e..e382a91830 100644 --- a/stable/spring-cloud-data-flow/templates/skipper-config.yaml +++ b/stable/spring-cloud-data-flow/templates/skipper-config.yaml @@ -29,7 +29,7 @@ data: readinessProbeDelay: {{ .Values.deployer.readinessProbe.initialDelaySeconds }} livenessProbeDelay: {{ .Values.deployer.livenessProbe.initialDelaySeconds }} datasource: - url: 'jdbc:mysql://{{ template "scdf.database.host" . }}:{{ template "scdf.database.port" . }}/{{ template "scdf.database.skipper" . }}' + url: 'jdbc:{{ template "scdf.database.scheme" . }}://{{ template "scdf.database.host" . }}:{{ template "scdf.database.port" . }}/{{ template "scdf.database.skipper" . }}' driverClassName: {{ template "scdf.database.driver" . }} username: {{ template "scdf.database.user" . }} password: {{ template "scdf.database.password" . }} diff --git a/stable/spring-cloud-data-flow/values.yaml b/stable/spring-cloud-data-flow/values.yaml index 2aed4791d3..b12a519666 100644 --- a/stable/spring-cloud-data-flow/values.yaml +++ b/stable/spring-cloud-data-flow/values.yaml @@ -81,6 +81,7 @@ mysql: ## you must specify the following database details database: driver: + scheme: host: port: user: scdf