Skip to content

Commit d81a0ae

Browse files
committed
Enable optional DB URL auto-assembly for MySQL
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
1 parent d1a2f9b commit d81a0ae

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

charts/devlake/templates/deployments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ spec:
197197
env:
198198
- name: PORT
199199
value: "{{ .Values.lake.port }}"
200-
{{- if (eq .Values.option.database "mysql") }}
200+
{{- if and (eq .Values.option.database "mysql") (.Values.option.assembleDbUrl) }}
201201
- name: DB_URL
202202
value: "mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_SERVER):$(MYSQL_PORT)/$(MYSQL_DATABASE)?charset=$(DB_CHARSET)&parseTime=$(DB_PARSE_TIME)&loc=$(DB_LOCATION){{ .Values.mysql.extraParams }}"
203203
{{- end }}

charts/devlake/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ option:
437437
# the existing k8s secret name of db connection auth. The secret name should be as same as .Values.grafana.envFromSecret
438438
connectionSecretName: "devlake-mysql-auth"
439439
autoCreateSecret: true
440+
# If true, the chart assembles DB_URL automatically for MySQL. Set to false
441+
# to disable auto-assembly and provide DB_URL yourself via `lake.envs` or
442+
# an external secret referenced by `lake.extraEnvsFromSecret`.
443+
assembleDbUrl: true
440444

441445
# Define some extra resources to be created
442446
# This section is useful when you need ExternalResource or Secrets, etc.

0 commit comments

Comments
 (0)