matrix-synapse: Update worker paths to Exact type

This commit is contained in:
Alexander "Ace" Olofsson 2022-07-24 22:56:55 +02:00
parent c514df9238
commit 30a0f880a2
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
3 changed files with 76 additions and 44 deletions

View file

@ -6,7 +6,7 @@ icon: https://matrix.org/images/matrix-logo.svg
appVersion: 1.63.1 appVersion: 1.63.1
type: application type: application
version: 2.3.6 version: 2.4.0
maintainers: maintainers:
- name: Alexander Olofsson - name: Alexander Olofsson
email: ace@haxalot.com email: ace@haxalot.com

View file

@ -66,7 +66,7 @@ spec:
name: {{ $service }} name: {{ $service }}
port: port:
number: 8083 number: 8083
pathType: ImplementationSpecific pathType: Exact
{{- else }} {{- else }}
serviceName: {{ $service }} serviceName: {{ $service }}
servicePort: 8083 servicePort: 8083
@ -79,7 +79,7 @@ spec:
name: {{ $service }} name: {{ $service }}
port: port:
number: 8083 number: 8083
pathType: ImplementationSpecific pathType: Exact
{{- else }} {{- else }}
serviceName: {{ $service }} serviceName: {{ $service }}
servicePort: 8083 servicePort: 8083
@ -97,7 +97,7 @@ spec:
name: {{ $service }} name: {{ $service }}
port: port:
number: 8083 number: 8083
pathType: ImplementationSpecific pathType: Exact
{{- else }} {{- else }}
serviceName: {{ $service }} serviceName: {{ $service }}
servicePort: 8083 servicePort: 8083
@ -110,7 +110,7 @@ spec:
name: {{ $service }} name: {{ $service }}
port: port:
number: 8083 number: 8083
pathType: ImplementationSpecific pathType: Exact
{{- else }} {{- else }}
serviceName: {{ $service }} serviceName: {{ $service }}
servicePort: 8083 servicePort: 8083

View file

@ -392,57 +392,86 @@ workers:
generic: true generic: true
listeners: [client, federation] listeners: [client, federation]
csPaths: csPaths:
# - "/_matrix/client/(v2_alpha|r0|v3)/sync" ## Sync requests
- "/_matrix/client/(api/v1|v2_alpha|r0|v3)/events" # - "/_matrix/client/(r0|v3)/sync"
# - "/_matrix/client/(api/v1|r0|v3)/initialSync" - "/_matrix/client/(api/v1|r0|v3)/events"
# - "/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync" # - "/_matrix/client/(api/v1|r0|v3)/initialSync"
# - "/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync"
## Client API requests
- "/_matrix/client/(api/v1|r0|v3|unstable)/createRoom"
- "/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms" - "/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state"
- "/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/spaces" - "/_matrix/client/v1/rooms/.*/hierarchy"
- "/_matrix/client/unstable/org.matrix.msc2946/rooms/.*/hierarchy" - "/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send"
- "/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary" - "/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary"
- "/_matrix/client/(api/v1|r0|v3|unstable)/account/3pid" - "/_matrix/client/(r0|v3|unstable)/account/3pid"
- "/_matrix/client/(api/v1|r0|v3|unstable)/keys/query" - "/_matrix/client/(r0|v3|unstable)/account/whoami"
- "/_matrix/client/(api/v1|r0|v3|unstable)/keys/changes" - "/_matrix/client/(r0|v3|unstable)/devices"
- "/_matrix/client/versions" - "/_matrix/client/versions"
- "/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer" - "/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer"
- "/_matrix/client/(api/v1|r0|v3|unstable)/joined_groups" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/.*"
- "/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups" - "/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms"
- "/_matrix/client/(api/v1|r0|v3|unstable)/publicised_groups/" - "/_matrix/client/(api/v1|r0|v3|unstable)/search"
## Encryption requests
- "/_matrix/client/(r0|v3|unstable)/keys/query"
- "/_matrix/client/(r0|v3|unstable)/keys/changes"
- "/_matrix/client/(r0|v3|unstable)/keys/claim"
- "/_matrix/client/(r0|v3|unstable)/room_keys/.*"
## Registration/login requests
- "/_matrix/client/(api/v1|r0|v3|unstable)/login" - "/_matrix/client/(api/v1|r0|v3|unstable)/login"
- "/_matrix/client/(r0|v3|unstable)/register" - "/_matrix/client/(r0|v3|unstable)/register"
- "/_matrix/client/(r0|v3|unstable)/auth/.*/fallback/web" - "/_matrix/client/v1/register/m.login.registration_token/validity"
## Event sending requests
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/.*"
- "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)" - "/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)"
- "/_matrix/client/(api/v1|r0|v3|unstable)/join/" - "/_matrix/client/(api/v1|r0|v3|unstable)/join/.*"
- "/_matrix/client/(api/v1|r0|v3|unstable)/profile/" - "/_matrix/client/(api/v1|r0|v3|unstable)/profile/.*"
## Account data requests
- "/_matrix/client/(r0|v3|unstable)/.*/tags"
- "/_matrix/client/(r0|v3|unstable)/.*/account_data"
## Receipts requests
- "/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt"
- "/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers"
## Presence requests
- "/_matrix/client/(api/v1|r0|v3|unstable)/presence/.*"
## User directory search requests
- "/_matrix/client/(r0|v3|unstable)/user_directory/search"
paths: paths:
- "/_matrix/federation/v1/event/" ## Federation requests
- "/_matrix/federation/v1/state/" - "/_matrix/federation/v1/event/.*"
- "/_matrix/federation/v1/state_ids/" - "/_matrix/federation/v1/state/.*"
- "/_matrix/federation/v1/backfill/" - "/_matrix/federation/v1/state_ids/.*"
- "/_matrix/federation/v1/get_missing_events/" - "/_matrix/federation/v1/backfill/.*"
- "/_matrix/federation/v1/get_missing_events/.*"
- "/_matrix/federation/v1/publicRooms" - "/_matrix/federation/v1/publicRooms"
- "/_matrix/federation/v1/query/" - "/_matrix/federation/v1/query/.*"
- "/_matrix/federation/v1/make_join/" - "/_matrix/federation/v1/make_join/.*"
- "/_matrix/federation/v1/make_leave/" - "/_matrix/federation/v1/make_leave/.*"
- "/_matrix/federation/v1/send_join/" - "/_matrix/federation/(v1|v2)/send_join/.*"
- "/_matrix/federation/v2/send_join/" - "/_matrix/federation/(v1|v2)/send_leave/.*"
- "/_matrix/federation/v1/send_leave/" - "/_matrix/federation/(v1|v2)/invite/.*"
- "/_matrix/federation/v2/send_leave/" - "/_matrix/federation/v1/event_auth/.*"
- "/_matrix/federation/v1/invite/" - "/_matrix/federation/v1/exchange_third_party_invite/.*"
- "/_matrix/federation/v2/invite/" - "/_matrix/federation/v1/user/devices/.*"
- "/_matrix/federation/v1/query_auth/"
- "/_matrix/federation/v1/event_auth/"
- "/_matrix/federation/v1/exchange_third_party_invite/"
- "/_matrix/federation/v1/user/devices/"
- "/_matrix/federation/v1/send/"
- "/_matrix/federation/v1/get_groups_publicised"
- "/_matrix/key/v2/query" - "/_matrix/key/v2/query"
- "/_matrix/federation/v1/hierarchy/.*"
## Inbound federation transaction request
- "/_matrix/federation/v1/send/.*"
## To separate the generic worker into specific concerns - for example federation transaction receiving; ## To separate the generic worker into specific concerns - for example federation transaction receiving;
## NB; This worker should have incoming traffic routed based on source IP, which is ## NB; This worker should have incoming traffic routed based on source IP, which is
@ -453,7 +482,7 @@ workers:
# generic: true # generic: true
# listeners: [federation] # listeners: [federation]
# paths: # paths:
# - "/_matrix/federation/v1/send/" # - "/_matrix/federation/v1/send/.*"
## Or /sync handling. ## Or /sync handling.
## NB; Care should be taken to route users to the same instance when scaling this worker, ## NB; Care should be taken to route users to the same instance when scaling this worker,
@ -469,6 +498,8 @@ workers:
# - "/_matrix/client/(api/v1|r0|v3)/initialSync" # - "/_matrix/client/(api/v1|r0|v3)/initialSync"
# - "/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync" # - "/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync"
## Specialized - non-generic workers below;
## This worker deals with pushing notifications. ## This worker deals with pushing notifications.
## NB; Only one instance of this worker can be run at a time, refer to the ## NB; Only one instance of this worker can be run at a time, refer to the
## information URL above. ## information URL above.
@ -495,14 +526,15 @@ workers:
enabled: false enabled: false
listeners: [media] listeners: [media]
csPaths: csPaths:
- "/_matrix/media/" - "/_matrix/media/.*"
- "/_synapse/admin/v1/purge_media_cache" - "/_synapse/admin/v1/purge_media_cache"
- "/_synapse/admin/v1/room/.*/media.*" - "/_synapse/admin/v1/room/.*/media.*"
- "/_synapse/admin/v1/user/.*/media.*" - "/_synapse/admin/v1/user/.*/media.*"
- "/_synapse/admin/v1/media/.*" - "/_synapse/admin/v1/media/.*"
- "/_synapse/admin/v1/quarantine_media/.*" - "/_synapse/admin/v1/quarantine_media/.*"
- "/_synapse/admin/v1/users/.*/media"
paths: paths:
- "/_matrix/media/" - "/_matrix/media/.*"
## This worker deals with user directory searches. ## This worker deals with user directory searches.
## ##