diff --git a/charts/metabase/Chart.yaml b/charts/metabase/Chart.yaml index d2a6bb2..20949cf 100644 --- a/charts/metabase/Chart.yaml +++ b/charts/metabase/Chart.yaml @@ -3,7 +3,7 @@ description: The easy, open source way for everyone in your company to ask questions and learn from data. name: metabase -version: 2.16.6 +version: 2.16.7 appVersion: v0.50.6 maintainers: - name: pmint93 diff --git a/charts/metabase/templates/deployment.yaml b/charts/metabase/templates/deployment.yaml index 22daf1e..9df3fe6 100644 --- a/charts/metabase/templates/deployment.yaml +++ b/charts/metabase/templates/deployment.yaml @@ -122,13 +122,37 @@ spec: name: {{ (printf "%s-database" (include "metabase.fullname" .)) }} key: connectionURI {{- else }} + {{- if and .Values.database.existingSecret .Values.database.existingSecretHostKey }} + - name: MB_DB_HOST + valueFrom: + secretKeyRef: + name: {{ .Values.database.existingSecret }} + key: {{ .Values.database.existingSecretHostKey }} + {{- else }} - name: MB_DB_HOST value: {{ .Values.database.host | quote }} + {{- end }} + {{- if and .Values.database.existingSecret .Values.database.existingSecretPortKey }} + - name: MB_DB_PORT + valueFrom: + secretKeyRef: + name: {{ .Values.database.existingSecret }} + key: {{ .Values.database.existingSecretPortKey }} + {{- else }} - name: MB_DB_PORT value: {{ .Values.database.port | quote }} + {{- end}} + {{- if and .Values.database.existingSecret .Values.database.existingSecretDatabaseNameKey }} + - name: MB_DB_DBNAME + valueFrom: + secretKeyRef: + name: {{ .Values.database.existingSecret }} + key: {{ .Values.database.existingSecretDatabaseNameKey }} + {{- else }} - name: MB_DB_DBNAME value: {{ .Values.database.dbname | quote }} {{- end }} + {{- end }} {{- if and .Values.database.existingSecret .Values.database.existingSecretUsernameKey }} - name: MB_DB_USER valueFrom: diff --git a/charts/metabase/values.yaml b/charts/metabase/values.yaml index e07a437..17570e4 100644 --- a/charts/metabase/values.yaml +++ b/charts/metabase/values.yaml @@ -80,6 +80,9 @@ database: # existingSecretPasswordKey: # existingSecretConnectionURIKey: # existingSecretEncryptionKeyKey: + # existingSecretPortKey: + # existingSecretHostKey: + # existingSecretDatabaseNameKey: ## One or more Google Cloud SQL database instances can be made available to Metabase via the *Cloud SQL Auth proxy*. ## These can be used for Metabase's internal database (by specifying `host: localhost` and the port above), or as ## additional databases (configured at Admin → Databases). Workload Identity should be used for authentication, so