Skip to content

Commit

Permalink
Allow other database than mysql (#518)
Browse files Browse the repository at this point in the history
This allow to specify a full springDatasourceUrl instead of create url
from springDatasourceHost and springDatasourceDb.

Signed-off-by: Florian Bezannier <[email protected]>
  • Loading branch information
flobz authored Dec 5, 2023
1 parent f4511ba commit 93b0e84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/hawkbit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/hawkbit/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions charts/hawkbit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 93b0e84

Please sign in to comment.