[matrix] upgrade to allow db customisation + various fixes
This commit is contained in:
parent
aab0851b62
commit
0af22cfdf1
4 changed files with 35 additions and 39 deletions
|
@ -26,7 +26,7 @@
|
||||||
# lowercase and may contain an explicit port.
|
# lowercase and may contain an explicit port.
|
||||||
# Examples: matrix.org, localhost:8080
|
# Examples: matrix.org, localhost:8080
|
||||||
#
|
#
|
||||||
server_name: "{{ tpl .Values.homeServerFQDN }}"
|
server_name: "{{ tpl .Values.homeServerFQDN . }}"
|
||||||
|
|
||||||
# When running as a daemon, the file to store the pid in
|
# When running as a daemon, the file to store the pid in
|
||||||
#
|
#
|
||||||
|
@ -767,17 +767,17 @@ caches:
|
||||||
#
|
#
|
||||||
# Example Postgres configuration:
|
# Example Postgres configuration:
|
||||||
#
|
#
|
||||||
#database:
|
database:
|
||||||
# name: psycopg2
|
name: psycopg2
|
||||||
# args:
|
args:
|
||||||
# user: synapse_user
|
user: {{ .Values.postgresUser }}
|
||||||
# password: secretpassword
|
password: SECRETPOSTGRESPASSWORD
|
||||||
# database: synapse
|
database: {{ .Values.postgresDBName }}
|
||||||
# host: localhost
|
host: {{ .Release.Name }}-postgres
|
||||||
# port: 5432
|
port: 5432
|
||||||
# cp_min: 5
|
cp_min: 5
|
||||||
# cp_max: 10
|
cp_max: 10
|
||||||
#
|
|
||||||
# For more information on using Synapse with Postgres, see `docs/postgres.md`.
|
# For more information on using Synapse with Postgres, see `docs/postgres.md`.
|
||||||
#
|
#
|
||||||
# database:
|
# database:
|
||||||
|
@ -791,7 +791,7 @@ caches:
|
||||||
# A yaml python logging config file as described by
|
# A yaml python logging config file as described by
|
||||||
# https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
|
# https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
|
||||||
#
|
#
|
||||||
log_config: "/log.config"
|
log_config: "/config-ro/log.yaml"
|
||||||
|
|
||||||
|
|
||||||
## Ratelimiting ##
|
## Ratelimiting ##
|
||||||
|
@ -1947,9 +1947,9 @@ oidc_providers:
|
||||||
# user_mapping_provider:
|
# user_mapping_provider:
|
||||||
# config:
|
# config:
|
||||||
# subject_claim: "id"
|
# subject_claim: "id"
|
||||||
# localpart_template: "{{ user.login }}"
|
# localpart_template: " user.login "
|
||||||
# display_name_template: "{{ user.name }}"
|
# display_name_template: " user.name "
|
||||||
# email_template: "{{ user.email }}"
|
# email_template: " user.email "
|
||||||
# attribute_requirements:
|
# attribute_requirements:
|
||||||
# - attribute: userGroup
|
# - attribute: userGroup
|
||||||
# value: "synapseUsers"
|
# value: "synapseUsers"
|
||||||
|
|
|
@ -72,5 +72,5 @@ metadata:
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/component: postgres
|
app.kubernetes.io/component: postgres
|
||||||
stringData:
|
stringData:
|
||||||
POSTGRES_USER: "matrix-synapse"
|
POSTGRES_USER: "{{ .Values.postgresUser }}"
|
||||||
POSTGRES_DB: "matrix-synapse"
|
POSTGRES_DB: "{{ .Values.postgresDBName }}"
|
||||||
|
|
|
@ -15,7 +15,6 @@ spec:
|
||||||
app.kubernetes.io/component: matrix-synapse
|
app.kubernetes.io/component: matrix-synapse
|
||||||
annotations:
|
annotations:
|
||||||
checksum/config: {{ include (print $.Template.BasePath "/synapse-proxy.yaml") . | sha256sum }}
|
checksum/config: {{ include (print $.Template.BasePath "/synapse-proxy.yaml") . | sha256sum }}
|
||||||
checksum/synapse: {{ include (print $.Template.BasePath "/synapse-conf.yaml") . | sha256sum }}
|
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: generate-matrix-signing-key
|
- name: generate-matrix-signing-key
|
||||||
|
@ -52,24 +51,33 @@ spec:
|
||||||
value: "no"
|
value: "no"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nginx-config-proxy
|
- name: nginx-config
|
||||||
mountPath: "/nginx-configs"
|
mountPath: "/nginx-configs"
|
||||||
- name: etcletsencrypt
|
- name: etcletsencrypt
|
||||||
mountPath: "/etc/letsencrypt"
|
mountPath: "/etc/letsencrypt"
|
||||||
- name: synapse
|
- name: synapse
|
||||||
image: matrixdotorg/synapse:{{ .Values.synapseVersion }}
|
image: matrixdotorg/synapse:{{ .Values.synapseVersion }}
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- "mkdir -p /config; sed \"s/SECRETPOSTGRESPASSWORD/$POSTGRES_PW/\" > /config/db.yaml; /start.py run"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8008
|
- containerPort: 8008
|
||||||
env:
|
env:
|
||||||
- name: SYNAPSE_CONFIG_PATH
|
- name: SYNAPSE_CONFIG_PATH
|
||||||
value: "/conf/homeserver.yaml"
|
value: "/config-ro/homeserver.yaml"
|
||||||
- name: SYNAPSE_CONFIG_DIR
|
- name: SYNAPSE_CONFIG_DIR
|
||||||
value: "/conf"
|
value: "/config"
|
||||||
|
- name: POSTGRES_PW
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Release.Name }}-postgres-config
|
||||||
|
key: POSTGRES_PASSWORD
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: "/data"
|
mountPath: "/data"
|
||||||
- name: synapse-conf
|
- name: synapse-conf
|
||||||
mountPath: "/conf"
|
mountPath: "/config-ro"
|
||||||
volumes:
|
volumes:
|
||||||
- name: etcletsencrypt
|
- name: etcletsencrypt
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
@ -77,12 +85,9 @@ spec:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ .Release.Name }}-data
|
claimName: {{ .Release.Name }}-data
|
||||||
- name: postgres-vars
|
|
||||||
secret:
|
|
||||||
secretName: {{ .Release.Name }}-postgres-config
|
|
||||||
- name: nginx-config
|
- name: nginx-config
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Release.Name }}-nginx-config
|
name: {{ .Release.Name }}-synapse-nginx-proxy
|
||||||
- name: synapse-conf
|
- name: synapse-conf
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ .Release.Name }}-synapse-conf
|
name: {{ .Release.Name }}-synapse-conf
|
||||||
|
@ -104,15 +109,3 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/component: matrix-synapse
|
app.kubernetes.io/component: matrix-synapse
|
||||||
|
|
||||||
# database:
|
|
||||||
# name: "psycopg2"
|
|
||||||
# args:
|
|
||||||
# database: "matrix-synapse"
|
|
||||||
# host: "localhost"
|
|
||||||
# user: "matrix-synapse"
|
|
||||||
# password: ""
|
|
||||||
# cp_min: 10
|
|
||||||
# cp_min: 5
|
|
||||||
|
|
||||||
# log_config: "/baseconfig/log.yaml"
|
|
||||||
|
|
|
@ -13,3 +13,6 @@ synapseVersion: "v1.49.2"
|
||||||
elementWebFQDN: "{{ .Release.Name }}-element-web.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
elementWebFQDN: "{{ .Release.Name }}-element-web.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||||
synapseFQDN: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
synapseFQDN: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||||
homeServerFQDN: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
homeServerFQDN: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||||
|
|
||||||
|
postgresUser: "matrix-synapse"
|
||||||
|
postgresDBName: "matrix-synapse"
|
||||||
|
|
Loading…
Add table
Reference in a new issue