Add postgres as an optional dependency

This commit is contained in:
Tulir Asokan
2019-10-23 22:53:48 +03:00
parent c919a1762b
commit a0f12a2c48
5 changed files with 27 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
charts/*
+6
View File
@@ -0,0 +1,6 @@
dependencies:
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com/
version: 6.5.0
digest: sha256:85139e9d4207e49c11c5f84d7920d0135cffd3d427f3f3638d4e51258990de2a
generated: "2019-10-23T22:11:37.005827507+03:00"
+5
View File
@@ -0,0 +1,5 @@
dependencies:
- name: postgresql
version: 6.5.0
repository: https://kubernetes-charts.storage.googleapis.com/
condition: postgresql.enabled
@@ -21,7 +21,11 @@ data:
port: {{ .Values.service.port }}
max_body_size: {{ .Values.appservice.maxBodySize }}
database: {{ .Values.appservice.database }}
{{- if .Values.postgresql.enabled }}
database: "postgres://postgres:{{ .Values.postgresql.postgresqlPassword }}@{{ .Release.Name }}-postgresql/{{ .Values.postgresql.postgresqlDatabase }}"
{{- else }}
database: {{ .Values.appservice.database | quote }}
{{- end }}
public:
{{- toYaml .Values.appservice.public | nindent 8 }}
+10 -7
View File
@@ -45,16 +45,19 @@ homeserver:
# Only applies if address starts with https://
verifySSL: true
postgresql:
enabled: true
postgresqlDatabase: mxtg
persistence:
size: 8Gi
resources:
requests:
memory: 256Mi
cpu: 100m
# Application service host/registration related details
# Changing these values requires regeneration of the registration.
appservice:
# The full URI to the database. SQLite and Postgres are fully supported.
# Other DBMSes supported by SQLAlchemy may or may not work.
# Format examples:
# SQLite: sqlite:///filename.db
# Postgres: postgres://username:password@hostname/dbname
database: postgres://username:password@hostname/dbname
# The maximum body size of appservice API requests (from the homeserver) in mebibytes
# Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
maxBodySize: 1