feat(mycloud-matrix): add matrix-authentication-service support
This commit is contained in:
parent
bb2ac61ed1
commit
6539a4b62b
10 changed files with 274 additions and 39 deletions
|
@ -9,6 +9,8 @@ components:
|
||||||
databases:
|
databases:
|
||||||
matrix-sliding-sync:
|
matrix-sliding-sync:
|
||||||
type: postgresql
|
type: postgresql
|
||||||
|
matrix-authentication-service:
|
||||||
|
type: postgresql
|
||||||
|
|
||||||
mycloud-matrix:
|
mycloud-matrix:
|
||||||
# patch mycloud-core to get another database
|
# patch mycloud-core to get another database
|
||||||
|
@ -16,3 +18,5 @@ components:
|
||||||
server:
|
server:
|
||||||
slidingSync:
|
slidingSync:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
authenticationService:
|
||||||
|
enabled: true
|
19
mycloud-matrix/templates/_hosts.tpl
Normal file
19
mycloud-matrix/templates/_hosts.tpl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{{- define "mycloud-matrix.domain" -}}
|
||||||
|
{{ .Values.server.host | default .Values.commons.ingress.domain }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "mycloud-matrix.domain.auth" -}}
|
||||||
|
{{ .Values.commons.auth.host | default (printf "auth.%s" .Values.commons.ingress.domain) }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "mycloud-matrix.host.server" -}}
|
||||||
|
{{ .Values.ingress.server.host | default (printf "matrix.%s" .Values.commons.ingress.domain) }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "mycloud-matrix.host.slidingSync" -}}
|
||||||
|
{{ .Values.ingress.slidingSync.host | default (printf "sliding.matrix.%s" .Values.commons.ingress.domain) }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "mycloud-matrix.host.authenticationService" -}}
|
||||||
|
{{ .Values.ingress.authenticationService.host | default (printf "auth.matrix.%s" .Values.commons.ingress.domain) }}
|
||||||
|
{{- end }}
|
|
@ -22,17 +22,20 @@ spec:
|
||||||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||||
interval: 10m
|
interval: 10m
|
||||||
values:
|
values:
|
||||||
{{- $serverHost := .Values.ingress.server.host | default (printf "matrix.%s" .Values.commons.ingress.domain) }}
|
|
||||||
{{- $clientHost := .Values.server.auth.webClient | default (printf "element.%s" .Values.commons.ingress.domain) }}
|
{{- $clientHost := .Values.server.auth.webClient | default (printf "element.%s" .Values.commons.ingress.domain) }}
|
||||||
blueprint:
|
blueprint:
|
||||||
authentik:
|
authentik:
|
||||||
domain: "https://{{ .Values.commons.auth.host | default (printf "auth.%s" .Values.commons.ingress.domain) }}"
|
domain: "https://{{ include "mycloud-matrix.domain.auth" . }}"
|
||||||
provider:
|
provider:
|
||||||
type: "oidc"
|
type: "oidc"
|
||||||
name: "Matrix"
|
name: "Matrix"
|
||||||
oidc:
|
oidc:
|
||||||
clientType: "confidential"
|
clientType: "confidential"
|
||||||
redirectURL: "https://{{ $serverHost }}/_synapse/client/oidc/callback"
|
{{- if .Values.server.authenticationService.enabled }}
|
||||||
|
redirectURL: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/upstream/callback/0000000000000000000MYC10VD"
|
||||||
|
{{- else }}
|
||||||
|
redirectURL: "https://{{ include "mycloud-matrix.host.server" . }}/_synapse/client/oidc/callback"
|
||||||
|
{{- end }}
|
||||||
clientID: {{ .Values.server.auth.clientID | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientID") | sha256sum }}
|
clientID: {{ .Values.server.auth.clientID | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientID") | sha256sum }}
|
||||||
clientSecret: {{ .Values.server.auth.clientSecret | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientSecret") | sha256sum }}
|
clientSecret: {{ .Values.server.auth.clientSecret | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientSecret") | sha256sum }}
|
||||||
signingKey: "authentik Self-signed Certificate"
|
signingKey: "authentik Self-signed Certificate"
|
||||||
|
|
|
@ -29,14 +29,12 @@ spec:
|
||||||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||||
interval: 10m
|
interval: 10m
|
||||||
values:
|
values:
|
||||||
{{- $serverDomain := .Values.server.host | default .Values.commons.ingress.domain }}
|
|
||||||
{{- $serverHost := .Values.ingress.server.host | default (printf "matrix.%s" .Values.commons.ingress.domain) }}
|
|
||||||
{{- $host := .Values.ingress.element.host | default (printf "element.%s" .Values.commons.ingress.domain) }}
|
{{- $host := .Values.ingress.element.host | default (printf "element.%s" .Values.commons.ingress.domain) }}
|
||||||
image:
|
image:
|
||||||
repository: docker.io/vectorim/element-web
|
repository: docker.io/vectorim/element-web
|
||||||
defaultServer:
|
defaultServer:
|
||||||
url: https://{{ $serverHost }}
|
url: https://{{ include "mycloud-matrix.host.server" . }}
|
||||||
name: {{ $serverDomain }}
|
name: {{ include "mycloud-matrix.domain" . | quote }}
|
||||||
config:
|
config:
|
||||||
sso_redirect_options:
|
sso_redirect_options:
|
||||||
on_welcome_page: true
|
on_welcome_page: true
|
||||||
|
@ -46,7 +44,7 @@ spec:
|
||||||
{{- with .Values.commons.ingress.annotations }}
|
{{- with .Values.commons.ingress.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.ingress.annotations }}
|
{{- with .Values.ingress.element.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
hosts:
|
hosts:
|
||||||
|
|
|
@ -23,17 +23,16 @@ spec:
|
||||||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||||
interval: 10m
|
interval: 10m
|
||||||
values:
|
values:
|
||||||
{{- $serverHost := .Values.ingress.server.host | default (printf "matrix.%s" .Values.commons.ingress.domain) }}
|
|
||||||
{{- $host := .Values.ingress.hydrogen.host | default (printf "hydrogen.%s" .Values.commons.ingress.domain) }}
|
{{- $host := .Values.ingress.hydrogen.host | default (printf "hydrogen.%s" .Values.commons.ingress.domain) }}
|
||||||
hydrogen:
|
hydrogen:
|
||||||
defaultHomeServer: {{ $serverHost }}
|
defaultHomeServer: {{ include "mycloud-matrix.host.server" . | quote }}
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
annotations:
|
annotations:
|
||||||
{{- with .Values.commons.ingress.annotations }}
|
{{- with .Values.commons.ingress.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.ingress.annotations }}
|
{{- with .Values.ingress.hydrogen.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
hosts:
|
hosts:
|
||||||
|
|
173
mycloud-matrix/templates/server/authentication-service.yaml
Normal file
173
mycloud-matrix/templates/server/authentication-service.yaml
Normal file
|
@ -0,0 +1,173 @@
|
||||||
|
{{- if .Values.server.authenticationService.enabled }}
|
||||||
|
{{ $secretName := printf "%s-authentication-service-secrets" .Release.Name }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $secretName }}
|
||||||
|
data:
|
||||||
|
admin_token: {{ derivePassword 1 "long" $.Values.commons.masterPassword "matrix-auth" "admin_token" | sha256sum | b64enc }}
|
||||||
|
{{- $clientSecret := derivePassword 1 "long" $.Values.commons.masterPassword "matrix-auth" "client_secret" | sha256sum }}
|
||||||
|
client_secret: {{ $clientSecret | b64enc }}
|
||||||
|
clients.yaml: {{ toYaml (dict
|
||||||
|
"config" (dict
|
||||||
|
"clients" (list
|
||||||
|
(dict
|
||||||
|
"client_id" "0000000000000000000SYNAPSE"
|
||||||
|
"client_auth_method" "client_secret_basic"
|
||||||
|
"client_secret" $clientSecret
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) | b64enc }}
|
||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}-authentication-service"
|
||||||
|
spec:
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: "wrenix-helm-charts"
|
||||||
|
namespace: "flux-system"
|
||||||
|
chart: "./matrix-authentication-service"
|
||||||
|
reconcileStrategy: "Revision"
|
||||||
|
install:
|
||||||
|
{{- toYaml .Values.commons.helm.release.install | nindent 4 }}
|
||||||
|
test:
|
||||||
|
{{- toYaml .Values.commons.helm.release.test | nindent 4 }}
|
||||||
|
upgrade:
|
||||||
|
{{- toYaml .Values.commons.helm.release.upgrade | nindent 4 }}
|
||||||
|
driftDetection:
|
||||||
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||||
|
interval: 10m
|
||||||
|
valuesFrom:
|
||||||
|
- kind: Secret
|
||||||
|
name: {{ $secretName }}
|
||||||
|
valuesKey: admin_token
|
||||||
|
targetPath: "config.matrix.secret"
|
||||||
|
- kind: Secret
|
||||||
|
name: {{ $secretName }}
|
||||||
|
valuesKey: clients.yaml
|
||||||
|
values:
|
||||||
|
config:
|
||||||
|
http:
|
||||||
|
public_base: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/"
|
||||||
|
issuer: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/"
|
||||||
|
matrix:
|
||||||
|
homeserver: {{ include "mycloud-matrix.domain" . }}
|
||||||
|
endpoint: "http://{{ .Release.Name }}-synapse:8008"
|
||||||
|
{{- with .Values.databases.authenticationService }}
|
||||||
|
database:
|
||||||
|
host: {{ .host | quote }}
|
||||||
|
username: {{ .username | quote }}
|
||||||
|
password: {{ .password | default (derivePassword 1 "long" $.Values.commons.masterPassword "matrix-authentication-service" "database_password" | b64enc) | quote }}
|
||||||
|
database: {{ .name | quote }}
|
||||||
|
{{- end }}
|
||||||
|
email:
|
||||||
|
from: {{ .Values.server.mail.from | default (printf "\"[%s] %s\" <%s>" .Values.commons.theme.title "matrix" .Values.commons.mail.from) | quote }}
|
||||||
|
reply_to: {{ .Values.server.mail.from | default (printf "\"[%s] %s\" <%s>" .Values.commons.theme.title "matrix" .Values.commons.mail.from) | quote }}
|
||||||
|
# from: {{ .Values.commons.mail.from | quote }}
|
||||||
|
# reply_to: {{ .Values.commons.mail.from | quote }}
|
||||||
|
{{ $mailHostname := .Values.server.mail.host | default .Values.commons.mail.host }}
|
||||||
|
{{- if $mailHostname }}
|
||||||
|
transport: smtp
|
||||||
|
{{- if .Values.commons.mail.use_tls }}
|
||||||
|
mode: starttls
|
||||||
|
{{- end }}
|
||||||
|
hostname: {{ $mailHostname }}
|
||||||
|
port: 587
|
||||||
|
username: {{ .Values.commons.mail.username | quote }}
|
||||||
|
password: {{ .Values.commons.mail.password | quote }}
|
||||||
|
{{- else }}
|
||||||
|
transport: "blackhole"
|
||||||
|
{{- end }}{{/* end-if $mailHostname */}}
|
||||||
|
passwords:
|
||||||
|
enabled: false
|
||||||
|
upstream_oauth2:
|
||||||
|
providers:
|
||||||
|
- id: 0000000000000000000MYC10VD
|
||||||
|
human_name: {{ .Values.commons.theme.title | quote }}
|
||||||
|
issuer: "https://{{ include "mycloud-matrix.domain.auth" . }}/application/o/mycloud-matrix/"
|
||||||
|
client_id: {{ .Values.server.auth.clientID | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientID") | sha256sum }}
|
||||||
|
client_secret: {{ .Values.server.auth.clientSecret | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientSecret") | sha256sum }}
|
||||||
|
token_endpoint_auth_method: client_secret_post
|
||||||
|
scope: "openid email profile"
|
||||||
|
discovery_mode: oidc
|
||||||
|
claims_imports:
|
||||||
|
{{`
|
||||||
|
subject:
|
||||||
|
action: force
|
||||||
|
template: "{{ user.sub }}"
|
||||||
|
localpart:
|
||||||
|
action: force
|
||||||
|
template: "{{ user.preferred_username }}"
|
||||||
|
displayname:
|
||||||
|
action: suggest
|
||||||
|
template: "{{ user.name }}"
|
||||||
|
email:
|
||||||
|
action: force
|
||||||
|
template: "{{ user.email }}"
|
||||||
|
set_email_verification: import
|
||||||
|
`}}
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
annotations:
|
||||||
|
{{- with .Values.commons.ingress.annotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.authenticationService.annotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
hosts:
|
||||||
|
- host: "{{ include "mycloud-matrix.host.authenticationService" . }}"
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
- host: "{{ include "mycloud-matrix.host.server" . }}"
|
||||||
|
paths:
|
||||||
|
# v1
|
||||||
|
- path: "/_matrix/client/v1/login"
|
||||||
|
pathType: Prefix
|
||||||
|
- path: "/_matrix/client/v1/logout"
|
||||||
|
pathType: Prefix
|
||||||
|
- path: "/_matrix/client/v1/refresh"
|
||||||
|
pathType: Prefix
|
||||||
|
# v2
|
||||||
|
- path: "/_matrix/client/v2/login"
|
||||||
|
pathType: Prefix
|
||||||
|
- path: "/_matrix/client/v2/logout"
|
||||||
|
pathType: Prefix
|
||||||
|
- path: "/_matrix/client/v2/refresh"
|
||||||
|
pathType: Prefix
|
||||||
|
# v3
|
||||||
|
- path: "/_matrix/client/v3/login"
|
||||||
|
pathType: Prefix
|
||||||
|
- path: "/_matrix/client/v3/logout"
|
||||||
|
pathType: Prefix
|
||||||
|
- path: "/_matrix/client/v3/refresh"
|
||||||
|
pathType: Prefix
|
||||||
|
{{- if .Values.commons.ingress.tls.enabled }}
|
||||||
|
tls:
|
||||||
|
{{- with .Values.commons.ingress.tls.override }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- else }}
|
||||||
|
- secretName: "mycloud-matrix-server-auth-cert"
|
||||||
|
hosts:
|
||||||
|
- {{ include "mycloud-matrix.host.authenticationService" . | quote }}
|
||||||
|
- secretName: "mycloud-matrix-server-cert"
|
||||||
|
hosts:
|
||||||
|
- {{ include "mycloud-matrix.host.server" . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
servicemonitor:
|
||||||
|
enabled: {{ (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml .Values.commons.prometheus.monitor.labels | nindent 10 }}
|
||||||
|
{{- end }}{{/* end-if .server.authenticationService.enabled */}}
|
|
@ -36,7 +36,7 @@ data:
|
||||||
"namespaces" (dict
|
"namespaces" (dict
|
||||||
"users" (list
|
"users" (list
|
||||||
(dict
|
(dict
|
||||||
"regex" (printf "@.*:%s" (.Values.server.host | default .Values.commons.ingress.domain | replace "." "\\." ))
|
"regex" (printf "@.*:%s" (include "mycloud-matrix.domain" . | replace "." "\\." ))
|
||||||
"exclusive" false
|
"exclusive" false
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,15 +23,15 @@ spec:
|
||||||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||||
interval: 10m
|
interval: 10m
|
||||||
values:
|
values:
|
||||||
{{- $host := .Values.ingress.slidingSync.host | default (printf "sliding.matrix.%s" .Values.commons.ingress.domain) }}
|
|
||||||
config:
|
config:
|
||||||
homeserver: http://{{ .Release.Name }}-synapse:8008
|
homeserver: http://{{ .Release.Name }}-synapse:8008
|
||||||
logLevel: INFO
|
|
||||||
postgresql:
|
postgresql:
|
||||||
host: {{ .Values.databases.slidingSync.host | quote }}
|
{{- with .Values.databases.slidingSync }}
|
||||||
username: {{ .Values.databases.slidingSync.username | quote }}
|
host: {{ .host | quote }}
|
||||||
password: {{ .Values.databases.slidingSync.password | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix-sliding-sync" "database_password" | b64enc) | quote }}
|
username: {{ .username | quote }}
|
||||||
database: {{ .Values.databases.slidingSync.name | quote }}
|
password: {{ .password | default (derivePassword 1 "long" $.Values.commons.masterPassword "matrix-sliding-sync" "database_password" | b64enc) | quote }}
|
||||||
|
database: {{ .name | quote }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -39,12 +39,11 @@ spec:
|
||||||
{{- with .Values.commons.ingress.annotations }}
|
{{- with .Values.commons.ingress.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.ingress.annotations }}
|
{{- with .Values.ingress.slidingSync.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
includeServerName: false
|
|
||||||
hosts:
|
hosts:
|
||||||
- host: "{{ $host }}"
|
- host: {{ include "mycloud-matrix.host.slidingSync" . | quote }}
|
||||||
paths:
|
paths:
|
||||||
- path: "/"
|
- path: "/"
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
@ -55,7 +54,7 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
- secretName: "mycloud-matrix-sliding-sync-cert"
|
- secretName: "mycloud-matrix-sliding-sync-cert"
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ $host }}"
|
- {{ include "mycloud-matrix.host.slidingSync" . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,21 @@ spec:
|
||||||
driftDetection:
|
driftDetection:
|
||||||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||||||
interval: 10m
|
interval: 10m
|
||||||
|
{{- if .Values.server.authenticationService.enabled }}
|
||||||
|
valuesFrom:
|
||||||
|
{{ $secretName := printf "%s-authentication-service-secrets" .Release.Name }}
|
||||||
|
- kind: Secret
|
||||||
|
name: {{ $secretName }}
|
||||||
|
valuesKey: client_secret
|
||||||
|
targetPath: "extraSecrets.experimental_features.msc3861.client_secret"
|
||||||
|
- kind: Secret
|
||||||
|
name: {{ $secretName }}
|
||||||
|
valuesKey: admin_token
|
||||||
|
targetPath: "extraSecrets.experimental_features.msc3861.admin_token"
|
||||||
|
{{- end }}
|
||||||
values:
|
values:
|
||||||
{{- $domain := .Values.server.host | default .Values.commons.ingress.domain }}
|
serverName: {{ include "mycloud-matrix.domain" . | quote }}
|
||||||
{{- $host := .Values.ingress.server.host | default (printf "matrix.%s" .Values.commons.ingress.domain) }}
|
publicServerName: {{ include "mycloud-matrix.host.server" . | quote }}
|
||||||
serverName: {{ $domain }}
|
|
||||||
publicServerName: {{ $host }}
|
|
||||||
config:
|
config:
|
||||||
enableRegistration: false
|
enableRegistration: false
|
||||||
useStructuredLogging: true
|
useStructuredLogging: true
|
||||||
|
@ -57,11 +67,20 @@ spec:
|
||||||
# TODO
|
# TODO
|
||||||
# notif_from: {{ .Values.server.mail.from | default (printf "[%s] %s <%s>" .Values.commons.theme.title "matrix" .Values.commons.mail.from) | quote }}
|
# notif_from: {{ .Values.server.mail.from | default (printf "[%s] %s <%s>" .Values.commons.theme.title "matrix" .Values.commons.mail.from) | quote }}
|
||||||
notif_from: {{ .Values.server.mail.from | default .Values.commons.mail.from | quote }}
|
notif_from: {{ .Values.server.mail.from | default .Values.commons.mail.from | quote }}
|
||||||
|
{{- if .Values.server.authenticationService.enabled }}
|
||||||
|
experimental_features:
|
||||||
|
msc3861:
|
||||||
|
enabled: true
|
||||||
|
issuer: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/"
|
||||||
|
client_id: 0000000000000000000SYNAPSE
|
||||||
|
client_auth_method: client_secret_basic
|
||||||
|
account_management_url: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/account/"
|
||||||
|
{{- else }}
|
||||||
oidc_providers:
|
oidc_providers:
|
||||||
- idp_id: mycloud
|
- idp_id: mycloud
|
||||||
idp_name: {{ .Values.commons.theme.title | quote }}
|
idp_name: {{ .Values.commons.theme.title | quote }}
|
||||||
discover: true
|
discover: true
|
||||||
issuer: "https://{{ .Values.commons.auth.host | default (printf "auth.%s" .Values.commons.ingress.domain) }}/application/o/mycloud-matrix/"
|
issuer: "https://{{ include "mycloud-matrix.domain.auth" . }}/application/o/mycloud-matrix/"
|
||||||
client_id: {{ .Values.server.auth.clientID | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientID") | sha256sum }}
|
client_id: {{ .Values.server.auth.clientID | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientID") | sha256sum }}
|
||||||
client_secret: {{ .Values.server.auth.clientSecret | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientSecret") | sha256sum }}
|
client_secret: {{ .Values.server.auth.clientSecret | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix" "auth.clientSecret") | sha256sum }}
|
||||||
scopes:
|
scopes:
|
||||||
|
@ -74,6 +93,7 @@ spec:
|
||||||
localpart_template: "{{ user.preferred_username }}"
|
localpart_template: "{{ user.preferred_username }}"
|
||||||
display_name_template: "{{ user.name|capitalize }}"
|
display_name_template: "{{ user.name|capitalize }}"
|
||||||
`}}
|
`}}
|
||||||
|
{{- end }}
|
||||||
extraLoggers:
|
extraLoggers:
|
||||||
synapse.storage.SQL:
|
synapse.storage.SQL:
|
||||||
level: WARNING
|
level: WARNING
|
||||||
|
@ -156,10 +176,15 @@ spec:
|
||||||
enabled: true
|
enabled: true
|
||||||
client:
|
client:
|
||||||
"m.homeserver":
|
"m.homeserver":
|
||||||
base_url: "https://{{ $host }}/"
|
base_url: "https://{{ include "mycloud-matrix.host.server" . }}/"
|
||||||
{{- if .Values.server.slidingSync.enabled }}
|
{{- if .Values.server.slidingSync.enabled }}
|
||||||
"org.matrix.msc3575.proxy":
|
"org.matrix.msc3575.proxy":
|
||||||
url: "https://{{ .Values.ingress.slidingSync.host | default (printf "sliding.matrix.%s" .Values.commons.ingress.domain) }}/"
|
url: "https://{{ include "mycloud-matrix.host.slidingSync" . }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.server.authenticationService.enabled }}
|
||||||
|
"org.matrix.msc2965.authentication":
|
||||||
|
issuer: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/"
|
||||||
|
account: "https://{{ include "mycloud-matrix.host.authenticationService" . }}/account/"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
@ -183,16 +208,16 @@ spec:
|
||||||
{{- with .Values.commons.ingress.annotations }}
|
{{- with .Values.commons.ingress.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.ingress.annotations }}
|
{{- with .Values.ingress.server.annotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
includeServerName: false
|
includeServerName: false
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ $host }}"
|
- {{ include "mycloud-matrix.host.server" . | quote }}
|
||||||
csHosts:
|
csHosts:
|
||||||
- "{{ $host }}"
|
- {{ include "mycloud-matrix.host.server" . | quote }}
|
||||||
wkHosts:
|
wkHosts:
|
||||||
- "{{ .Values.commons.ingress.domain }}"
|
- {{ include "mycloud-matrix.domain" . | quote }}
|
||||||
{{- if .Values.commons.ingress.tls.enabled }}
|
{{- if .Values.commons.ingress.tls.enabled }}
|
||||||
tls:
|
tls:
|
||||||
{{- with .Values.commons.ingress.tls.override }}
|
{{- with .Values.commons.ingress.tls.override }}
|
||||||
|
@ -200,8 +225,8 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
- secretName: "mycloud-matrix-server-cert"
|
- secretName: "mycloud-matrix-server-cert"
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ .Values.commons.ingress.domain }}"
|
- {{ include "mycloud-matrix.domain" . | quote }}
|
||||||
- "{{ $host }}"
|
- {{ include "mycloud-matrix.host.server" . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -218,10 +243,12 @@ spec:
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
enabled: false
|
||||||
externalPostgresql:
|
externalPostgresql:
|
||||||
host: {{ .Values.databases.server.host | quote }}
|
{{- with .Values.databases.server }}
|
||||||
username: {{ .Values.databases.server.username | quote }}
|
host: {{ .host | quote }}
|
||||||
password: {{ .Values.databases.server.password | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix-synapse" "database_password" | b64enc) | quote }}
|
username: {{ .username | quote }}
|
||||||
database: {{ .Values.databases.server.name | quote }}
|
password: {{ .password | default (derivePassword 1 "long" $.Values.commons.masterPassword "matrix-synapse" "database_password" | b64enc) | quote }}
|
||||||
|
database: {{ .name | quote }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
podmonitor:
|
podmonitor:
|
||||||
|
|
|
@ -64,6 +64,8 @@ server:
|
||||||
scaling: false
|
scaling: false
|
||||||
slidingSync:
|
slidingSync:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
authenticationService:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
# -- generated by .commons.masterPassword
|
# -- generated by .commons.masterPassword
|
||||||
|
@ -93,6 +95,10 @@ ingress:
|
||||||
# -- default: sliding.matrix.(.commons.ingress.domain)
|
# -- default: sliding.matrix.(.commons.ingress.domain)
|
||||||
host:
|
host:
|
||||||
annotations:
|
annotations:
|
||||||
|
authenticationService:
|
||||||
|
# -- default: auth.matrix.(.commons.ingress.domain)
|
||||||
|
host:
|
||||||
|
annotations:
|
||||||
element:
|
element:
|
||||||
enabled: true
|
enabled: true
|
||||||
# -- default: element.(.commons.ingress.domain)
|
# -- default: element.(.commons.ingress.domain)
|
||||||
|
@ -119,6 +125,13 @@ databases:
|
||||||
username: matrix-sliding-sync
|
username: matrix-sliding-sync
|
||||||
# -- generated by .commons.masterPassword (equal to mycloud-services)
|
# -- generated by .commons.masterPassword (equal to mycloud-services)
|
||||||
password:
|
password:
|
||||||
|
authenticationService:
|
||||||
|
# -- default is from mycloud-services
|
||||||
|
host: mycloud-services-postgresql
|
||||||
|
name: matrix-authentication-service
|
||||||
|
username: matrix-authentication-service
|
||||||
|
# -- generated by .commons.masterPassword (equal to mycloud-services)
|
||||||
|
password:
|
||||||
bridge:
|
bridge:
|
||||||
signal:
|
signal:
|
||||||
# -- default is from mycloud-services
|
# -- default is from mycloud-services
|
||||||
|
|
Loading…
Add table
Reference in a new issue