From a27065fe1b82b391beeec3c3a9211ec0428948ad Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Mon, 6 Nov 2023 09:23:29 +0100 Subject: [PATCH 1/4] Allow other database than mysql 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 | 2 +- charts/hawkbit/values.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) 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..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" From 7d73603407d6f675218bd4826f6785511d5b87f6 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Tue, 14 Nov 2023 16:40:45 +0100 Subject: [PATCH 2/4] docs: add comment for springDatasourceUrl Signed-off-by: Florian Bezannier --- charts/hawkbit/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index c937b562..5fb06c2d 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -83,6 +83,7 @@ fileStorage: env: springDatasourceHost: "hawkbit-mysql" springDatasourceDb: "hawkbit" + # if springDatasourceUrl is set override default mysql db url springDatasourceUrl: "" springRabbitmqHost: "hawkbit-rabbitmq" springRabbitmqUsername: "hawkbit" From 07b76e78b7af898d6167ee2ad1efb03f65382485 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Tue, 14 Nov 2023 16:41:02 +0100 Subject: [PATCH 3/4] chore: replace online if to multi line Signed-off-by: Florian Bezannier --- charts/hawkbit/templates/deployment.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 559dd145..3f19fd64 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" - 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}}" + {{- 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: From 1988d1fdd3bd08eed40433df41f81d3aa65cd7b9 Mon Sep 17 00:00:00 2001 From: Florian BEZANNIER <48728684+flobz@users.noreply.github.com> Date: Thu, 23 Nov 2023 12:32:03 +0100 Subject: [PATCH 4/4] fix: add hyphen Co-authored-by: Avgustin Marinov --- charts/hawkbit/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 3f19fd64..389ebf37 100644 --- a/charts/hawkbit/templates/deployment.yaml +++ b/charts/hawkbit/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: - name: "SPRING_DATASOURCE_URL" {{- if .Values.env.springDatasourceUrl }} value: "{{ .Values.env.springDatasourceUrl }}" - {{ else }} + {{- 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"