Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 1 | # Matrix server (synapse). |
| 2 | # This needs a secret provisioned, create with: |
| 3 | # ns=matrix |
| 4 | # |
| 5 | # SIGNING_KEY="$(kubectl run -n $ns -i --quiet --restart=Never --rm synapse-generate-config --image=matrixdotorg/synapse:v1.19.2 --env SYNAPSE_SERVER_NAME=dummy --env SYNAPSE_REPORT_STATS=no -o yaml --command -- sh -c '/start.py generate >/dev/null && cat /data/*.signing.key')" |
| 6 | # kubectl -n $ns create secret generic synapse --from-literal=postgres_password=$(pwgen 24 1) --from-literal=macaroon_secret_key=$(pwgen 32 1) --from-literal=registration_shared_secret=$(pwgen 32 1) --from-literal=homeserver_signing_key="$SIGNING_KEY" --from-literal=redis_password=$(pwgen 32 1) --from-literal=worker_replication_secret=$(pwgen 32 1) |
| 7 | # kubectl -n $ns create secret generic oauth2-cas-proxy --from-literal=oauth2_secret=... |
| 8 | # |
| 9 | # When migrating from matrix.libsonnet, instance signing key, redis passwsord |
| 10 | # and worker replication secret need to be added to existing synapse secret: |
| 11 | # |
| 12 | # echo "homeserver_signing_key: $(kubectl -n $ns exec deploy/synapse -- sh -c 'cat /data/*.signing.key' | base64 -w0)" |
| 13 | # echo "redis_password: $(pwgen 32 1 | tr -d '\n' | base64 -w0)" |
| 14 | # echo "worker_replication_secret: $(pwgen 32 1 | tr -d '\n' | base64 -w0)" |
| 15 | # kubectl -n $ns edit secret synapse |
| 16 | # # ...add homeserver_signing_key, redis_password and worker_replication_secret keys |
| 17 | # |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 18 | # Additionally some resources need to be explicitly removed due to |
| 19 | # label/annotations changes: |
| 20 | # kubectl -n $ns delete deployment riot-web oauth2-cas-proxy wellknown synapse |
| 21 | # |
| 22 | # Some service configuration customization fields have been renamed: |
| 23 | # .riotConfig → .riot.config |
| 24 | # .synapseConfig → .synapse.config |
| 25 | # |
Piotr Dobrowolski | fb119aa | 2021-01-31 19:07:32 +0100 | [diff] [blame] | 26 | # When migrating from CAS to OpenID Connect authentication scheme following need |
| 27 | # to be ensured: |
| 28 | # * https://{homeserver}/_synapse/oidc/callback is added to allowed callback URLs list |
| 29 | # * openid scope is enabled for configured client |
| 30 | # |
Piotr Dobrowolski | 122d5e5 | 2021-09-10 23:54:34 +0200 | [diff] [blame] | 31 | # In order to deploy matrix-media-repo as a replacement for synapse built-in |
| 32 | # media workers the following steps need to be carried out: |
| 33 | # |
| 34 | # 1. Generate password and bootstrap extra postgres user |
| 35 | # pwgen 32 1 > secrets/plain/media-repo-$ns-postgres |
| 36 | # echo "create database mediarepo; create user mediarepo with password '$(cat secrets/plain/media-repo-$ns-postgres)'; grant all privileges on database mediarepo to mediarepo;" | kubectl -n $ns exec -it deploy/waw3-postgres psql |
| 37 | # secretstore sync secrets |
| 38 | # |
| 39 | # 2. Fetch Ceph RGW credentials |
| 40 | # kubectl get secrets -n ceph-waw3 rook-ceph-object-user-waw-hdd-redundant-3-object-$ns -o json | jq '.data|map_values(@base64d)' > secrets/plain/media-repo-$ns-ceph.json |
| 41 | # secretstore sync secrets |
| 42 | # |
| 43 | # 3. Create an apropriate bucket using s3cmd |
| 44 | # s3cmd --access_key="$(jq -r '.AccessKey' secrets/plain/media-repo-$ns-ceph.json)" --secret_key="$(jq -r '.SecretKey' secrets/plain/media-repo-$ns-ceph.json)" --host=object.ceph-waw3.hswaw.net --host-bucket=object.ceph-waw3.hswaw.net mb s3://media-repo-$ns |
| 45 | # |
| 46 | # 4. Add relevant configuration overrides in cfg.mediaRepo key for your |
| 47 | # deployment configuration file: |
| 48 | # |
| 49 | # mediaRepo+: { |
| 50 | # enable: true, |
| 51 | # route: false, |
| 52 | # s3+: { |
| 53 | # endpoint: std.strReplace((import "secrets/plain/media-repo-$ns-ceph.json").Endpoint, "http://", ""), |
| 54 | # accessKey: (import "secrets/plain/media-repo-$ns-ceph.json").AccessKey, |
| 55 | # secretKey: (import "secrets/plain/media-repo-$ns-ceph.json").SecretKey, |
| 56 | # bucketName: "media-repo-$ns", |
| 57 | # region: "eu", |
| 58 | # }, |
| 59 | # db+: { |
| 60 | # password: std.strReplace(importstr "secrets/plain/media-repo-$ns-postgres", "\n", ""), |
| 61 | # }, |
| 62 | # }, |
| 63 | # |
| 64 | # 5. Additionally, when migrating from already deployed synapse media worker the |
| 65 | # following command needs to be run in order to import existing media files: |
| 66 | # kubectl -n $ns exec deploy/media-repo -- import_synapse -baseUrl http://synapse-media:8008 -dbHost waw3-postgres -dbPassword "$(kubectl -n $ns get secret synapse -o json | jq -r '.data.postgres_password | @base64d')" -config /config/config.yaml -serverName 'SERVER_NAME' |
| 67 | # |
| 68 | # 6. After migrating data over from native synapse media worker storage traffic |
| 69 | # can be rerouted to matrix-media-repo by switching cfg.mediaRepo.route flag |
| 70 | # to true |
| 71 | # |
| 72 | # 7. Run import step #5 again to make sure no media were left missing in old |
| 73 | # media worker deployment - import operation is indempotent and can be ran |
| 74 | # against a synapse media worker that's not handling user traffic anymore. |
| 75 | # |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 76 | # Sequencing appservices is fun. The appservice needs to run first (for |
| 77 | # instance, via a bootstrap job), and on startup it will spit out a |
| 78 | # registration file. This registration file then needs to be fed to synapse - |
| 79 | # this is done via specialy named secrets (appservice-X-registration, for X key |
| 80 | # in the appservices object). |
| 81 | # |
| 82 | # For appservice-irc instances, you can use this oneliner magic to get the |
| 83 | # registration YAML from logs. |
| 84 | # kubectl -n matrix create secret generic appservice-irc-freenode-registration --from-file=registration.yaml=<(kubectl -n matrix logs job/appservice-irc-freenode-bootstrap | tail -n +4 | sed -r 's/(.*aliases:.*)/ group_id: "+freenode:hackerspace.pl"\n\1/') |
| 85 | # |
| 86 | # For appservice-telegram instances, you can use this oneliner magic: |
| 87 | # kubectl -n matrix create secret generic appservice-telegram-prod-registration --from-file=registration.yaml=<(kubectl -n matrix logs job/appservice-telegram-prod-bootstrap | grep -A 100 SNIPSNIP | grep -v SNIPSNIP) |
| 88 | |
| 89 | local kube = import "../../../kube/kube.libsonnet"; |
| 90 | local postgres = import "../../../kube/postgres.libsonnet"; |
| 91 | local redis = import "../../../kube/redis.libsonnet"; |
| 92 | |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 93 | local riot = import "./riot.libsonnet"; |
| 94 | local cas = import "./cas.libsonnet"; |
| 95 | local wellKnown = import "./wellknown.libsonnet"; |
| 96 | local synapse = import "./synapse.libsonnet"; |
Piotr Dobrowolski | 122d5e5 | 2021-09-10 23:54:34 +0200 | [diff] [blame] | 97 | local mediaRepo = import "./media-repo.libsonnet"; |
Piotr Dobrowolski | 690ed45 | 2022-05-07 11:27:24 +0200 | [diff] [blame] | 98 | local coturn = import "./coturn.libsonnet"; |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 99 | |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 100 | { |
| 101 | local app = self, |
| 102 | local cfg = app.cfg, |
| 103 | cfg:: { |
| 104 | namespace: error "cfg.namespace must be set", |
| 105 | # webDomain is the domain name at which element will run |
| 106 | webDomain: error "cfg.webDomain must be set", |
| 107 | # serverName is the server part of the MXID this homeserver will cover |
| 108 | serverName: error "cfg.serverName must be set", |
| 109 | storageClassName: "waw-hdd-redundant-3", |
| 110 | |
| 111 | images: { |
Mateusz Lenik | 8bd24f4 | 2022-04-17 19:56:06 +0200 | [diff] [blame] | 112 | synapse: "matrixdotorg/synapse:v1.56.0", |
Piotr Dobrowolski | dc1878c | 2022-09-13 21:15:16 +0200 | [diff] [blame] | 113 | riot: "vectorim/element-web:v1.11.8", |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 114 | casProxy: "registry.k0.hswaw.net/q3k/oauth2-cas-proxy:0.1.4", |
Piotr Dobrowolski | d3c14e5 | 2022-09-27 01:47:02 +0200 | [diff] [blame] | 115 | appserviceIRC: "matrixdotorg/matrix-appservice-irc:release-0.35.1", |
Serge Bazanski | 8eae454 | 2021-05-19 15:42:13 +0000 | [diff] [blame] | 116 | appserviceTelegram: "dock.mau.dev/tulir/mautrix-telegram@sha256:c6e25cb57e1b67027069e8dc2627338df35d156315c004a6f2b34b6aeaa79f77", |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 117 | wellKnown: "registry.k0.hswaw.net/q3k/wellknown:1611960794-adbf560851a46ad0e58b42f0daad7ef19535687c", |
Piotr Dobrowolski | 654dd80 | 2022-09-13 20:48:13 +0200 | [diff] [blame] | 118 | mediaRepo: "turt2live/matrix-media-repo:v1.2.12", |
Piotr Dobrowolski | 690ed45 | 2022-05-07 11:27:24 +0200 | [diff] [blame] | 119 | coturn: "coturn/coturn:4.5.2-r11-alpine", |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 120 | }, |
| 121 | |
| 122 | # OpenID Connect provider configuration. |
| 123 | # Currently only client_secret can be provided as a secretKeyRef. |
| 124 | # |
| 125 | # https://${cfg.webDomain}/_synapse/oidc/callback needs to be set as |
| 126 | # allowed OAuth2/OpenID Connect callback URL |
| 127 | # |
| 128 | # See: https://github.com/matrix-org/synapse/blob/v1.25.0/docs/openid.md |
| 129 | oidc: { |
| 130 | enable: false, |
| 131 | config: { |
| 132 | issuer: error "oidc.config.issuer must be set", |
| 133 | client_id: error "oidc.config.client_id must be set", |
| 134 | client_secret: error "oidc.config.client_secret must be set", |
| 135 | |
| 136 | # Set this to true when migrating from existing CAS deployment |
| 137 | allow_existing_users: false, |
| 138 | user_mapping_provider: { |
| 139 | config: { |
| 140 | localpart_template: '{{ user.sub }}', |
| 141 | display_name_template: '{{ user.sub }}', |
| 142 | }, |
| 143 | }, |
| 144 | |
| 145 | # Extra configuration required when migrating from |
| 146 | # oauth2-cas-proxy bound to https://sso.hackerspace.pl |
| 147 | # user_profile_method: "userinfo_endpoint", |
| 148 | # client_auth_method: "client_secret_post", |
| 149 | }, |
| 150 | }, |
| 151 | |
| 152 | # Central Authentication Scheme, a single-sign-on system. Note: this flow is now called 'SSO' in Matrix, we keep this name for legacy reasons. |
| 153 | # Refer to https://matrix.org/docs/spec/client_server/r0.6.1#sso-client-login |
| 154 | cas: { |
| 155 | # whether to enable the CAS proxy (ie. connect to hswaw sso via OAuth) |
| 156 | enable: false, |
| 157 | # generate client ID and secret in with your OAuth2 provider, refer to https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/ |
| 158 | oauth2: { |
| 159 | clientID: error "cas.oauth2.clientID must be set", |
| 160 | clientSecret: error "cas.oauth2.clientSecret must be set", |
| 161 | scope: error "cas.oauth2.scope must be set", |
| 162 | authorizeURL: error "cas.oauth2.authorizeURL must be set", |
| 163 | tokenURL: error "cas.oauth2.tokenURL must be set", |
| 164 | userinfoURL: error "cas.oauth2.userinfoURL must be set", |
| 165 | }, |
| 166 | }, |
| 167 | |
| 168 | # Serve /.well-known/matrix configuration endpoints required when using |
| 169 | # cfg.webDomain directly as mxid. |
| 170 | wellKnown: false, |
Piotr Dobrowolski | 122d5e5 | 2021-09-10 23:54:34 +0200 | [diff] [blame] | 171 | |
| 172 | # matrix-media-repo S3-based media storage container |
| 173 | mediaRepo: { |
| 174 | enable: false, |
| 175 | |
| 176 | # Route /_matrix/media/ endpoints to matrix-media-repo. Set this |
| 177 | # to true after migrating media files to matrix-media-repo. |
| 178 | route: false, |
| 179 | |
| 180 | s3: { |
| 181 | endpoint: error "mediaRepo.s3.endpoint needs to be set", |
| 182 | accessKey: error "mediaRepo.s3.accessKey needs to be set", |
| 183 | secretKey: error "mediaRepo.s3.secretKey needs to be set", |
| 184 | bucketName: error "mediaRepo.s3.bucketName needs to be set", |
| 185 | region: error "mediaRepo.s3.region needs to be set", |
| 186 | }, |
| 187 | |
| 188 | db: { |
| 189 | username: "mediarepo", |
| 190 | password: error "mediaRepo.db.password needs to be set", |
| 191 | database: "mediarepo", |
| 192 | host: "waw3-postgres", |
| 193 | }, |
| 194 | }, |
| 195 | |
| 196 | # List of administrative users MXIDs (used in matrix-media-repo only) |
| 197 | admins: [], |
Piotr Dobrowolski | 690ed45 | 2022-05-07 11:27:24 +0200 | [diff] [blame] | 198 | |
| 199 | # Deploy coturn STUN/TURN server |
| 200 | coturn: { |
| 201 | enable: false, |
| 202 | config: { |
| 203 | domain: error "coturn.config.domain must be set", |
| 204 | |
| 205 | # Default to public domain - this may be adjusted when multiple |
| 206 | # turn servers are deployed. |
| 207 | realm: self.domain, |
| 208 | |
| 209 | # Set this to assigned LoadBalacer IP for correct NAT resolution |
| 210 | loadBalancerIP: null, |
| 211 | |
| 212 | authSecret: { secretKeyRef: { name: "coturn", key: "auth_secret" } }, |
| 213 | }, |
| 214 | }, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 215 | }, |
| 216 | |
Piotr Dobrowolski | fb119aa | 2021-01-31 19:07:32 +0100 | [diff] [blame] | 217 | # DEPRECATED: this needs to be removed in favor of namespace.Contain() in |
| 218 | # modules that depend on this (appservices/instance defintions) |
| 219 | metadata(component):: { |
| 220 | namespace: cfg.namespace, |
| 221 | labels: { |
| 222 | "app.kubernetes.io/name": "matrix", |
| 223 | "app.kubernetes.io/managed-by": "kubecfg", |
| 224 | "app.kubernetes.io/component": component, |
| 225 | }, |
| 226 | }, |
| 227 | |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 228 | namespace: kube.Namespace(cfg.namespace), |
| 229 | |
| 230 | postgres3: postgres { |
| 231 | cfg+: { |
| 232 | namespace: cfg.namespace, |
| 233 | appName: "synapse", |
| 234 | database: "synapse", |
| 235 | username: "synapse", |
| 236 | prefix: "waw3-", |
| 237 | password: { secretKeyRef: { name: "synapse", key: "postgres_password" } }, |
| 238 | storageClassName: cfg.storageClassName, |
| 239 | storageSize: "100Gi", |
| 240 | initdbArgs: "--encoding='UTF8' --lc-collate='C' --lc-ctype='C'", |
Piotr Dobrowolski | 529e181 | 2021-02-13 19:44:37 +0100 | [diff] [blame] | 241 | |
| 242 | opts: { |
| 243 | max_connections: "300", |
| 244 | shared_buffers: "80MB", |
| 245 | }, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 246 | }, |
| 247 | }, |
| 248 | |
| 249 | redis: redis { |
| 250 | cfg+: { |
| 251 | namespace: cfg.namespace, |
| 252 | appName: "synapse", |
| 253 | storageClassName: cfg.storageClassName, |
| 254 | password: { secretKeyRef: { name: "synapse", key: "redis_password" } }, |
Piotr Dobrowolski | 529e181 | 2021-02-13 19:44:37 +0100 | [diff] [blame] | 255 | persistence: false, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 256 | }, |
| 257 | }, |
| 258 | |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 259 | riot: riot { |
| 260 | ns: app.namespace, |
| 261 | cfg+: { |
| 262 | webDomain: cfg.webDomain, |
| 263 | serverName: cfg.serverName, |
| 264 | image: cfg.images.riot, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 265 | }, |
| 266 | }, |
| 267 | |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 268 | cas: if cfg.cas.enable && cfg.oidc.enable then error "cfg.cas.enable and cfg.oidc.enable options are exclusive" |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 269 | else if cfg.cas.enable then cas { |
| 270 | ns: app.namespace, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 271 | cfg+: { |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 272 | image: cfg.images.casProxy, |
| 273 | webDomain: cfg.webDomain, |
| 274 | oauth2: cfg.cas.oauth2, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 275 | }, |
| 276 | }, |
| 277 | |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 278 | wellKnown: if cfg.wellKnown then wellKnown { |
| 279 | ns: app.namespace, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 280 | cfg+: { |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 281 | image: cfg.images.wellKnown, |
| 282 | webDomain: cfg.webDomain, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 283 | }, |
| 284 | } else {}, |
| 285 | |
Piotr Dobrowolski | 122d5e5 | 2021-09-10 23:54:34 +0200 | [diff] [blame] | 286 | mediaRepo: if cfg.mediaRepo.enable then mediaRepo { |
| 287 | ns: app.namespace, |
| 288 | cfg+: { |
| 289 | image: cfg.images.mediaRepo, |
| 290 | |
| 291 | homeservers: [ |
| 292 | {name: cfg.serverName, csApi: "https://" + cfg.webDomain} |
| 293 | ], |
| 294 | admins: cfg.admins, |
| 295 | |
| 296 | s3: cfg.mediaRepo.s3, |
| 297 | db: cfg.mediaRepo.db, |
| 298 | }, |
| 299 | } else {}, |
| 300 | |
Piotr Dobrowolski | 690ed45 | 2022-05-07 11:27:24 +0200 | [diff] [blame] | 301 | coturn: if cfg.coturn.enable then coturn { |
| 302 | ns: app.namespace, |
| 303 | cfg+: { |
| 304 | storageClassName: cfg.storageClassName, |
| 305 | image: cfg.images.coturn, |
| 306 | realm: cfg.coturn.config.realm, |
| 307 | loadBalancerIP: cfg.coturn.config.loadBalancerIP, |
| 308 | authSecret: cfg.coturn.config.authSecret, |
| 309 | }, |
| 310 | } else null, |
| 311 | |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 312 | synapse: synapse { |
| 313 | ns: app.namespace, |
| 314 | postgres: app.postgres3, |
| 315 | redis: app.redis, |
| 316 | appservices: app.appservices, |
| 317 | cfg+: app.cfg { |
| 318 | image: app.cfg.images.synapse, |
| 319 | |
| 320 | macaroonSecretKey: { secretKeyRef: { name: "synapse", key: "macaroon_secret_key" } }, |
| 321 | registrationSharedSecret: { secretKeyRef: { name: "synapse", key: "registration_shared_secret" } }, |
| 322 | workerReplicationSecret: { secretKeyRef: { name: "synapse", key: "worker_replication_secret" } }, |
| 323 | }, |
| 324 | }, |
| 325 | |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 326 | // Any appservice you add here will require an appservice-X-registration |
| 327 | // secret containing a registration.yaml file. Adding something to this |
| 328 | // dictionary will cause Synapse to not start until that secret is |
| 329 | // available - so change things carefully! |
| 330 | // If bootstrapping a new appservice, just keep it out of this dictionary |
| 331 | // until it spits you a registration YAML and you feed that to a secret. |
| 332 | appservices: {}, |
| 333 | |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 334 | ingress: app.namespace.Contain(kube.Ingress("matrix")) { |
| 335 | metadata+: { |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 336 | annotations+: { |
| 337 | "kubernetes.io/tls-acme": "true", |
| 338 | "certmanager.k8s.io/cluster-issuer": "letsencrypt-prod", |
| 339 | "nginx.ingress.kubernetes.io/proxy-body-size": "0", |
| 340 | "nginx.ingress.kubernetes.io/use-regex": "true", |
| 341 | }, |
| 342 | }, |
| 343 | spec+: { |
| 344 | tls: [ |
| 345 | { |
| 346 | hosts: [cfg.webDomain], |
| 347 | secretName: "synapse-tls", |
| 348 | }, |
| 349 | ], |
| 350 | rules: [ |
| 351 | { |
| 352 | host: cfg.webDomain, |
| 353 | http: { |
| 354 | paths: [ |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 355 | { path: path, backend: app.synapse.genericWorker.svc.name_port } |
| 356 | for path in app.synapse.genericWorker.paths |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 357 | ] + [ |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 358 | { path: "/", backend: app.riot.svc.name_port }, |
Piotr Dobrowolski | 122d5e5 | 2021-09-10 23:54:34 +0200 | [diff] [blame] | 359 | { path: "/_matrix/media/", backend: if cfg.mediaRepo.route then app.mediaRepo.svc.name_port else app.synapse.mediaWorker.svc.name_port }, |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 360 | { path: "/_matrix/", backend: app.synapse.main.svc.name_port }, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 361 | |
| 362 | # Used by OpenID Connect login flow |
Piotr Dobrowolski | b67ae48 | 2021-01-31 10:35:38 +0100 | [diff] [blame] | 363 | { path: "/_synapse/", backend: app.synapse.main.svc.name_port }, |
Piotr Dobrowolski | 8ec8657 | 2021-01-30 13:06:07 +0100 | [diff] [blame] | 364 | ] + (if cfg.cas.enable then [ |
| 365 | { path: "/_cas", backend: app.cas.svc.name_port }, |
| 366 | ] else []) + (if cfg.wellKnown then [ |
| 367 | { path: "/.well-known/matrix", backend: app.wellKnown.svc.name_port }, |
| 368 | ] else []) |
| 369 | }, |
| 370 | } |
| 371 | ], |
| 372 | }, |
| 373 | }, |
| 374 | } |