Skip to content

Commit

Permalink
feat(helm): expose DATABASE_URL (#5445)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnplkndll authored Jul 5, 2022
1 parent 48077fc commit 4f2dd36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dev/helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 5 additions & 0 deletions dev/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions dev/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down

0 comments on commit 4f2dd36

Please sign in to comment.