Skip to content

Commit

Permalink
feat(config): add support for config.yaml file
Browse files Browse the repository at this point in the history
Support for specifying a config.yaml config file was added
[here](https://github.com/metabase/metabase/pull/25986/files). I'm not
sure if this is the best way to add support for this, but would love to
have the ability to specify the databases as part of the Helm Chart
values.
  • Loading branch information
hazzadous authored Nov 11, 2022
1 parent f3a03f5 commit 4fa1333
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
4 changes: 4 additions & 0 deletions charts/metabase/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ data:
log4j.properties:
{{ toYaml .Values.log4jProperties | indent 4}}
{{- end}}
config.yaml:
version: 1
config:
{{ toYaml .Values.config | indent 6}}
10 changes: 8 additions & 2 deletions charts/metabase/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,19 @@ spec:
serviceAccountName: {{ template "metabase.serviceAccountName" . }}
volumes:
{{- if .Values.log4jProperties}}
- name: config
- name: log4j
configMap:
name: {{ template "metabase.fullname" . }}-config
name: {{ template "metabase.fullname" . }}-log4j
items:
- key: log4j.properties
path: log4j.properties
{{- end }}
- name: config
configMap:
name: {{ template "metabase.fullname" . }}-config
items:
- key: config.yaml
path: config.yaml
{{- if ne (len .Values.extraVolumes) 0 }}
{{ toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
22 changes: 22 additions & 0 deletions charts/metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,28 @@ session:
# sessionCookies:
# cookieSameSite:

# Specifies the config to use as config.yaml, as per
# https://github.com/metabase/metabase/pull/25986/files
#
config:
# users:
# - first_name: Cam
# last_name: Saul
# password: 2cans
# email: [email protected]
# - first_name: Cam
# last_name: Era
# password: 2cans
# email: [email protected]
# databases:
# - type: postgres
# host: localhost
# port: 5432
# name: test-data
# password: {{ env MY_POSTGRES_PASSWORD }}
# settings:
# my-setting: 1234

# specify init containers, e.g. for module download
extraInitContainers: []
# - name: download-modules
Expand Down

0 comments on commit 4fa1333

Please sign in to comment.