feat(helm): expose DATABASE_URL (#5445)

This commit is contained in:
Don Kendall 2022-07-05 18:26:50 -04:00 committed by GitHub
parent 48077fc9e5
commit 4f2dd36e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -2,7 +2,7 @@
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}

View File

@ -41,6 +41,10 @@ spec:
env:
- name: DB_TYPE
value: postgres
{{- if .Values.externalPostgresql.databaseURL }}
- name: DATABASE_URL
value: {{ .Values.externalPostgresql.databaseURL }}
{{- else }}
- name: DB_HOST
value: {{ template "wiki.postgresql.host" . }}
- name: DB_PORT
@ -62,6 +66,7 @@ spec:
name: {{ template "wiki.postgresql.secret" . }}
{{- end }}
key: {{ template "wiki.postgresql.secretKey" . }}
{{- end }}
- name: HA_ACTIVE
value: {{ .Values.replicaCount | int | le 2 | quote }}
{{- with .Values.volumeMounts }}

View File

@ -102,6 +102,10 @@ sideload:
# - name: HTTPS_PROXY
# value: http://my.proxy.com:3128
## This will override the postgresql chart values
# externalPostgresql:
# databaseURL: postgresql://postgres:postgres@postgres:5432/wiki?sslmode=require
## Configuration values for the postgresql dependency.
## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md
##