From 0a91aec23f9d0d1b433588953f50db1c43a9a71b Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Mon, 6 Nov 2023 09:18:43 +0100 Subject: [PATCH] Allow other database than mysql This allow to specify a full springDatasourceUrl instead of create url from springDatasourceHost and springDatasourceDb. --- charts/hawkbit/templates/deployment.yaml | 2 +- charts/hawkbit/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 1724face..559dd145 100644 --- a/charts/hawkbit/templates/deployment.yaml +++ b/charts/hawkbit/templates/deployment.yaml @@ -37,7 +37,7 @@ spec: - name: SPRING_PROFILES_ACTIVE value: "{{ .Values.spring.profiles }}" - name: "SPRING_DATASOURCE_URL" - value: "jdbc:mysql://{{ if .Values.mysql.enabled }}{{ .Release.Name }}-mysql{{ else }}{{ .Values.env.springDatasourceHost }}{{ end }}:3306/{{ .Values.env.springDatasourceDb }}" + value: "{{ if .Values.env.springDatasourceUrl }}{{ .Values.env.springDatasourceUrl }}{{ else }}jdbc:mysql://{{ if .Values.mysql.enabled }}{{ .Release.Name }}-mysql{{ else }}{{ .Values.env.springDatasourceHost }}{{ end }}:3306/{{ .Values.env.springDatasourceDb }} {{end}}" - name: "SPRING_APPLICATION_JSON" valueFrom: secretKeyRef: diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index c598a5f7..c937b562 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -83,6 +83,7 @@ fileStorage: env: springDatasourceHost: "hawkbit-mysql" springDatasourceDb: "hawkbit" + springDatasourceUrl: "" springRabbitmqHost: "hawkbit-rabbitmq" springRabbitmqUsername: "hawkbit" springRabbitmqPassword: "hawkbit"