87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Secret
|
||
|
metadata:
|
||
|
name: {{ include "matrix-synapse.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "matrix-synapse.labels" . | nindent 4 }}
|
||
|
stringData:
|
||
|
config.yaml: |
|
||
|
{{- if .Values.config.recaptcha }}
|
||
|
## Captcha ##
|
||
|
|
||
|
recaptcha_private_key: {{ .Values.config.recaptcha.privateKey | quote }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.config.turnSecret }}
|
||
|
|
||
|
## Turn ##
|
||
|
|
||
|
turn_shared_secret: {{ .Values.config.turnSecret | quote }}
|
||
|
|
||
|
{{- end }}
|
||
|
## Registration ##
|
||
|
|
||
|
registration_shared_secret: {{ .Values.config.registrationSharedSecret | default (randAlphaNum 24) | quote }}
|
||
|
|
||
|
## API Configuration ##
|
||
|
|
||
|
{{- if .Values.config.macaroonSecretKey }}
|
||
|
|
||
|
macaroon_secret_key: {{ .Values.config.macaroonSecretKey | quote }}
|
||
|
{{- end }}
|
||
|
|
||
|
## Database configuration ##
|
||
|
|
||
|
database:
|
||
|
name: "psycopg2"
|
||
|
{{- $postgresConfig := .Values.externalPostgresql }}
|
||
|
{{- if .Values.postgresql.enabled }}
|
||
|
{{- $postgresConfig = .Values.postgresql }}
|
||
|
{{- end }}
|
||
|
{{- with $postgresConfig.options }}
|
||
|
{{- toYaml . | nindent 6 }}
|
||
|
{{- end }}
|
||
|
args:
|
||
|
host: {{ include "matrix-synapse.postgresql.host" . | quote }}
|
||
|
port: {{ include "matrix-synapse.postgresql.port" . }}
|
||
|
sslmode: {{ $postgresConfig.sslmode | default "prefer" | quote }}
|
||
|
user: {{ include "matrix-synapse.postgresql.username" . | quote }}
|
||
|
{{- $postgresPass := include "matrix-synapse.postgresql.password" . }}
|
||
|
{{- if and $postgresPass (not .Values.postgresql.existingSecret) }}
|
||
|
password: {{ $postgresPass | quote }}
|
||
|
{{- else }}
|
||
|
password: "@@POSTGRES_PASSWORD@@"
|
||
|
{{- end }}
|
||
|
database: {{ include "matrix-synapse.postgresql.database" . | quote }}
|
||
|
cp_min: 5
|
||
|
cp_max: 10
|
||
|
{{- with $postgresConfig.extraArgs }}
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
|
||
|
## Redis configuration ##
|
||
|
|
||
|
redis:
|
||
|
enabled: true
|
||
|
host: {{ include "matrix-synapse.redis.host" . | quote }}
|
||
|
{{- with (include "matrix-synapse.redis.port" .) }}
|
||
|
port: {{ . }}
|
||
|
{{- end }}
|
||
|
{{- $redisPass := include "matrix-synapse.redis.password" . }}
|
||
|
{{- if or .Values.redis.auth.enabled .Values.redis.usePassword .Values.redis.password .Values.redis.auth.password .Values.externalRedis.password }}
|
||
|
{{- if and $redisPass (not .Values.redis.auth.existingSecret) }}
|
||
|
password: {{ $redisPass | quote }}
|
||
|
{{- else }}
|
||
|
password: "@@REDIS_PASSWORD@@"
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- with (include "matrix-synapse.redis.dbid" .) }}
|
||
|
dbid: {{ . }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{- with .Values.extraSecrets }}
|
||
|
|
||
|
## Extra secrets ##
|
||
|
{{ . | toYaml | nindent 4 }}
|
||
|
{{- end }}
|