2020-08-07 21:23:34 +00:00
|
|
|
---
|
|
|
|
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 ##
|
|
|
|
|
2020-08-08 22:15:10 +00:00
|
|
|
registration_shared_secret: {{ .Values.config.registrationSharedSecret | default (randAlphaNum 24) | quote }}
|
2020-08-07 21:23:34 +00:00
|
|
|
|
|
|
|
## API Configuration ##
|
|
|
|
|
|
|
|
macaroon_secret_key: {{ required "You must specify a macaroon as config.macaroonSecretKey" .Values.config.macaroonSecretKey | quote }}
|
|
|
|
|
|
|
|
{{- $postgresHost := include "matrix-synapse.postgresql.host" . }}
|
|
|
|
{{- $postgresDB := include "matrix-synapse.postgresql.database" . }}
|
|
|
|
{{- $postgresUser := include "matrix-synapse.postgresql.username" . }}
|
|
|
|
{{- $postgresPort := include "matrix-synapse.postgresql.port" . }}
|
|
|
|
{{- $postgresPass := include "matrix-synapse.postgresql.password" . }}
|
|
|
|
## Database configuration ##
|
|
|
|
|
|
|
|
database:
|
|
|
|
name: "psycopg2"
|
|
|
|
args:
|
|
|
|
user: {{ $postgresUser | quote }}
|
|
|
|
{{- if $postgresPass }}
|
|
|
|
password: {{ $postgresPass | quote }}
|
|
|
|
{{- else }}
|
|
|
|
password: "@@POSTGRES_PASSWORD@@"
|
|
|
|
{{- end }}
|
|
|
|
database: {{ $postgresDB | quote }}
|
|
|
|
host: {{ $postgresHost | quote }}
|
|
|
|
port: {{ $postgresPort }}
|
|
|
|
cp_min: 5
|
|
|
|
cp_max: 10
|
|
|
|
|
|
|
|
{{- $redisHost := include "matrix-synapse.redis.host" . }}
|
|
|
|
{{- $redisPort := include "matrix-synapse.redis.port" . }}
|
|
|
|
{{- $redisPass := include "matrix-synapse.redis.password" . }}
|
|
|
|
## Redis configuration ##
|
|
|
|
|
|
|
|
redis:
|
|
|
|
enabled: true
|
|
|
|
host: {{ $redisHost | quote }}
|
2020-08-08 22:15:10 +00:00
|
|
|
{{- if or .Values.redis.password .Values.externalRedis.password }}
|
|
|
|
{{- if $redisPass }}
|
2020-08-07 21:23:34 +00:00
|
|
|
password: {{ $redisPass | quote }}
|
2020-08-08 22:15:10 +00:00
|
|
|
{{- else }}
|
2020-08-07 21:23:34 +00:00
|
|
|
password: "@@REDIS_PASSWORD@@"
|
2020-08-08 22:15:10 +00:00
|
|
|
{{- end }}
|
2020-08-07 21:23:34 +00:00
|
|
|
{{- end }}
|
2020-08-08 22:15:10 +00:00
|
|
|
|
|
|
|
{{- if and .Values.signingkey.job.enabled (not .Values.signingkey.existingSecret) }}
|
|
|
|
{{- $name := include "matrix-synapse.workername" (dict "global" . "worker" "signingkey") }}
|
|
|
|
{{- if not (lookup "v1" "Secret" .Release.Namespace $name) }}
|
2020-08-07 21:23:34 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
2020-08-08 22:15:10 +00:00
|
|
|
annotations:
|
|
|
|
helm.sh/resource-policy: keep
|
2020-08-07 21:23:34 +00:00
|
|
|
name: {{ $name }}
|
|
|
|
labels:
|
|
|
|
{{- include "matrix-synapse.labels" . | nindent 4 }}
|
2020-08-08 22:15:10 +00:00
|
|
|
app.kubernetes.io/component: signingkey-job
|
|
|
|
{{- end }}
|
2020-08-07 21:23:34 +00:00
|
|
|
{{- end }}
|