[stable/metabase] allow exising secrets to be used for database credentials + add extra pods labels value (#20234)

Signed-off-by: Romain Boces <bocesr@gmail.com>
This commit is contained in:
Romain Boces
2020-01-22 20:12:49 -08:00
committed by Kubernetes Prow Robot
parent 82e313313b
commit 43fd9be091
5 changed files with 23 additions and 9 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
description: The easy, open source way for everyone in your company to ask questions
and learn from data.
name: metabase
version: 0.9.4
version: 0.10.0
appVersion: v0.34.0
maintainers:
- name: pmint93
+5
View File
@@ -46,6 +46,7 @@ The following table lists the configurable parameters of the Metabase chart and
| ------------------------------- | ----------------------------------------------------------- | ----------------- |
| replicaCount | desired number of controller pods | 1 |
| podAnnotations | controller pods annotations | {} |
| podLabels | extra pods labels | {} |
| image.repository | controller container image repository | metabase/metabase |
| image.tag | controller container image tag | v0.34.0 |
| image.pullPolicy | controller container image pull policy | IfNotPresent |
@@ -63,6 +64,10 @@ The following table lists the configurable parameters of the Metabase chart and
| database.dbname | Database name | null |
| database.username | Database username | null |
| database.password | Database password | null |
| database.existingSecret | Exising secret for database credentials | null |
| database.existingSecretUsernameKey | Username key for exising secret | null |
| database.existingSecretPasswordKey | Password key for exising secret | null |
| database.existingSecretConnectionURIKey | ConnectionURI key for exising secret | null |
| password.complexity | Complexity requirement for Metabase account's password | normal |
| password.length | Minimum length required for Metabase account's password | 6 |
| timeZone | Service time zone | UTC |
@@ -1,3 +1,4 @@
{{- if and (ne (.Values.database.type | lower) "h2") (not .Values.database.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
@@ -13,7 +14,6 @@ data:
{{- if .Values.database.encryptionKey }}
encryptionKey: {{ .Values.database.encryptionKey | b64enc | quote }}
{{- end }}
{{- if ne (.Values.database.type | lower) "h2" }}
{{- if .Values.database.connectionURI }}
connectionURI: {{ .Values.database.connectionURI | b64enc | quote }}
{{- else }}
+10 -7
View File
@@ -23,6 +23,9 @@ spec:
labels:
app: {{ template "metabase.name" . }}
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | trim | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
@@ -59,12 +62,12 @@ spec:
key: encryptionKey
{{- end }}
{{- if ne (.Values.database.type | lower) "h2" }}
{{- if .Values.database.connectionURI }}
{{- if or .Values.database.existingSecretConnectionURIKey .Values.database.connectionURI }}
- name: MB_DB_CONNECTION_URI
valueFrom:
secretKeyRef:
name: {{ template "metabase.fullname" . }}-database
key: connectionURI
name: {{ or .Values.database.existingSecret (printf "%s-database" (include "metabase.fullname" .)) }}
key: {{ or .Values.database.existingSecretConnectionURIKey "connectionURI" }}
{{- else }}
- name: MB_DB_HOST
value: {{ .Values.database.host | quote }}
@@ -75,13 +78,13 @@ spec:
- name: MB_DB_USER
valueFrom:
secretKeyRef:
name: {{ template "metabase.fullname" . }}-database
key: username
name: {{ or .Values.database.existingSecret (printf "%s-database" (include "metabase.fullname" .)) }}
key: {{ or .Values.database.existingSecretUsernameKey "username" }}
- name: MB_DB_PASS
valueFrom:
secretKeyRef:
name: {{ template "metabase.fullname" . }}-database
key: password
name: {{ or .Values.database.existingSecret (printf "%s-database" (include "metabase.fullname" .)) }}
key: {{ or .Values.database.existingSecretPasswordKey "password" }}
{{- end }}
{{- end }}
- name: MB_PASSWORD_COMPLEXITY
+6
View File
@@ -4,6 +4,7 @@
# NOTE: Should remain 1
replicaCount: 1
podAnnotations: {}
podLabels: {}
image:
repository: metabase/metabase
tag: v0.34.0
@@ -34,6 +35,11 @@ database:
# password:
## Alternatively, use a connection URI for full configurability. Example for SSL enabled Postgres.
# connectionURI: postgres://user:password@host:port/database?ssl=true&sslmode=require&sslfactory=org.postgresql.ssl.NonValidatingFactory"
## If a secret with the database credentials already exists, use the following values:
# existingSecret:
# existingSecretUsernameKey:
# existingSecretPasswordKey:
# existingSecretConnectionURIKey:
password:
# Changing Metabase password complexity: