--- 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 | quote }} ## 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.yaml: | ## 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" . }} {{- if $redisHost }} redis.yaml: | ## Redis configuration ## redis: enabled: true host: {{ $redisHost | quote }} {{- if or .Values.redis.password .Values.externalRedis.password }} {{- if $redisPass }} password: {{ $redisPass | quote }} {{- else }} password: "@@REDIS_PASSWORD@@" {{- end }} {{- end }} {{- end }} {{- if not .Values.signingkey.existingSecret }} {{- $name := include "matrix-synapse.workername" (dict "global" . "worker" "signingkey") }} {{- if not (lookup "v1" "Secret" .Release.Namespace $name) }} --- apiVersion: v1 kind: Secret metadata: name: {{ $name }} labels: {{- include "matrix-synapse.labels" . | nindent 4 }} job: {{ $name }} {{- end }} {{- end }}