From 93b0e84cbdee8b39700eb77be2ead153b5443c73 Mon Sep 17 00:00:00 2001 From: Florian BEZANNIER <48728684+flobz@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:56:14 +0100 Subject: [PATCH] Allow other database than mysql (#518) This allow to specify a full springDatasourceUrl instead of create url from springDatasourceHost and springDatasourceDb. Signed-off-by: Florian Bezannier --- charts/hawkbit/Chart.yaml | 2 +- charts/hawkbit/templates/deployment.yaml | 4 ++++ charts/hawkbit/values.yaml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/hawkbit/Chart.yaml b/charts/hawkbit/Chart.yaml index 28b13706..7eb39b7c 100644 --- a/charts/hawkbit/Chart.yaml +++ b/charts/hawkbit/Chart.yaml @@ -10,7 +10,7 @@ # SPDX-License-Identifier: EPL-2.0 --- apiVersion: v2 -version: 1.5.0 +version: 1.6.0 appVersion: "0.3.0M6-mysql" description: | Eclipse hawkBit™ is a domain independent back-end framework for rolling out software updates diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 1724face..389ebf37 100644 --- a/charts/hawkbit/templates/deployment.yaml +++ b/charts/hawkbit/templates/deployment.yaml @@ -37,7 +37,11 @@ spec: - name: SPRING_PROFILES_ACTIVE value: "{{ .Values.spring.profiles }}" - name: "SPRING_DATASOURCE_URL" + {{- if .Values.env.springDatasourceUrl }} + value: "{{ .Values.env.springDatasourceUrl }}" + {{- else }} value: "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..5fb06c2d 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -83,6 +83,8 @@ fileStorage: env: springDatasourceHost: "hawkbit-mysql" springDatasourceDb: "hawkbit" + # if springDatasourceUrl is set override default mysql db url + springDatasourceUrl: "" springRabbitmqHost: "hawkbit-rabbitmq" springRabbitmqUsername: "hawkbit" springRabbitmqPassword: "hawkbit"