1
0
Fork 0
Commit Graph

144 Commits (a63c315f7df7ae71117f5d301755324a0dc3390e)

Author SHA1 Message Date
informatic 1da87e5209 app/matrix: bump appservice-irc
Change-Id: I70d856125754b3ffab556c7f264616471bfdd47f
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1306
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-06-19 08:47:09 +00:00
informatic 7d0e56cba7 app/matrix: remove stream writer endpoints from generic worker
Change-Id: I93dc263f00becceb1428da99161b883a23a1f027
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1303
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-05-01 08:17:57 +00:00
informatic 5ff2ccf5df app/matrix: force non-id_token flow to fix SSO
Presence of id_token in IDP token response causes synapse to demand
jwks_uri to be present in config/metadata. (login flow failing with
<<Missing "jwks_uri" in metadata>> message)
This behaviour was introduced somewhere between 1.42.0 and 1.56.0.

This is currently not set up correctly on sso.hackerspace.pl (we hand
out hs256 tokens instead of proper rsa ones) so this change will make it
fall back to non-oidc/plain oauth2 flow.

Change-Id: I4ff8aa175b4f0bbdcb3ee993b7cbd4545eac561a
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1302
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-05-01 08:17:57 +00:00
mlen 8bd24f4a96 Enable Matrix message thread support.
This change enables experimental message threading support and upgrades
Synapse and Element to their latest stable versions.

Change-Id: I68334982168ffdac98a1602a157be727b04e58d6
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1286
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-05-01 08:17:57 +00:00
informatic 529e181497 app/matrix: appservice workers
This change extracts appservice workers (deployed and tested) and prepares for
federation sender workers extraction (still partially broken)

Change-Id: I2d63fe44538ea2a7c5fd492f6ce119bc35a9eb03
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1101
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-05-01 08:17:57 +00:00
informatic 497870680e app/onlyoffice: bump to v7.0.0.132
Change-Id: I5c75d92126352bd185935125af04f51d4b91acc3
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1261
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-04-27 00:18:05 +00:00
informatic 77af94df2f app/matrix: add healthchecks, increase generic workers
Change-Id: I1605919d52c69044963082bbf094ff2ece902471
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1147
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-16 21:47:39 +00:00
informatic f56db19385 app/matrix: bump synapse do 1.42.0, enable public room browsing
Change-Id: Idf5a2e7bdcff89c0093908b17afc455e2768694b
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1146
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-16 21:47:39 +00:00
informatic cf3d8481fd app/matrix: upgrade element-web to v1.8.5
riot-web containers are no longer published.

We shall also readjust our internal naming for matrix web client from
riot to something more generic at some point.

Change-Id: Ice85af3ae29b587c13a3ba27d13c9bd655d7fcfd
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1145
Reviewed-by: informatic <informatic@hackerspace.pl>
2021-09-16 18:57:08 +00:00
informatic 21c8cd6833 app/matrix/matrix.hackerspace.pl: finish matrix-media-repo rollout
Change-Id: I7acc34c82c8ffe1334bb9201b993a410eb517b63
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1144
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-16 18:57:08 +00:00
q3k ebe6075556 app/matrix: media repo proxy init
This implements media-repo-proxy, a lil' bit of Go to make our
infrastructure work with matrix-media-repo's concept of Host headers.

For some reason, MMR really wants Host: hackerspace.pl instead of Host:
matrix.hackerspace.pl. We'd fix that in their code, but with no tests
and with complex config reload logic it looks very daunting. We'd just
fix that in our Ingress, but that's not easy (no per-rule host
overrides).

So, we commit a tiny little itty bitty war crime and implement a piece
of Go code that serves as a rewriter for this.

This works, tested on boston:

    $ curl -H "Host: matrix.hackerspace.pl" 10.10.12.46:8080/_matrix/media/r0/download/hackerspace.pl/EwVBulPgCWDWNGMKjcOKGGbk | file -
    /dev/stdin: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 650x300, components 3

(this address is media-repo.matrix.svc.k0.hswaw.net)

But hey, at least it has tests.

Change-Id: Ib6af1988fe8e112c9f3a5577506b18b48d80af62
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1143
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-16 18:57:08 +00:00
informatic 8b9c8f9a03 app/matrix/matrix.hackerspace.pl: deploy matrix-media-repo
Change-Id: If80335595190cf2e22cc2ef5d5f305b70e09d5d7
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1142
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-16 18:57:08 +00:00
informatic 122d5e5864 app/matrix: matrix-media-repo RGW-based media storage
Change-Id: I459bd78eee52fd349a16f31a48346d3258ef50a4
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1081
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-15 21:12:34 +00:00
informatic 2e191eae7b app/matrix/matrix.hackerspace.pl: pin synapse media-worker container version
We keep this pinned to older version to prevent unneeded media container
restarts.

Change-Id: I221237d3f88720779572fd972e8ada65e829864d
2021-09-14 22:19:44 +02:00
informatic 0f26c4afbc app/matrix: appservice-irc v0.29.0 upgrade
Change-Id: I5b09b3e861442c0b8579abdbeff8983ab1ec0208
2021-09-14 20:00:42 +02:00
informatic 5cc64bf60e Merge "app/matrix: bump synapse to 1.37.1" 2021-09-14 17:51:07 +00:00
mlen dd5090d0a8 app/matrix: bump appservice-irc to 0.27.0
Change-Id: I93ba1c5a6d31f5cce0e801b7a0cf44d02a6a37f8
2021-07-18 18:10:11 +00:00
Norbert Szulc a5e8c33c24 app/matrix: bump synapse to 1.37.1
Change-Id: Ia75dfc0688b97f5252c98ee79d3821a758b93409
2021-07-08 15:10:43 +02:00
q3k ed421911ce app/matrix: matrix.hackerspace.pl: give psql more storage
We ran out of disk space on the old PVC. Made a new one, copied data
over, and this change points the postgres data mount to that new PVC.

Change-Id: Iea4e140680066a3335cc69caf9293093f90bb568
2021-06-30 21:23:49 +00:00
q3k abca7901a2 app/matrix: bump riot to 1.7.29
Change-Id: I26c99f110abb7a68320587d7056558403b34a122
2021-06-06 14:23:26 +00:00
viq a1501ab250 matrix: bump version and remove default options
Change-Id: I3b66b5869957b574b0d5e58d52d45ff5832bccbc
2021-06-06 13:10:36 +00:00
q3k 1431d1d2db app/matrix: matrix.hackerspace.pl: add libera.chat static mappings
Change-Id: Ib9052c14ab9c91ed2d11fce40bccf214d08df340
2021-06-06 12:59:25 +00:00
q3k 972e54651c app/matrix: appservice-irc: use secret in bootstrap job
Previously: 856b216459 switched to using a
Secret instead of a ConfigMap for appservice-irc. That however didn't
update the bootstrap job which still used the ConfigMap. This fixes
that.

Change-Id: I50f33935691678ce24ecf4e04d7ce1b13c184929
2021-06-06 12:59:25 +00:00
q3k 196c556001 app/matrix: matrix.hackerspace.pl: unplumb a static secret channel
Change-Id: I63801798b2bd7f97f6c6f16b9243dc98102911ea
2021-05-26 19:46:44 +00:00
q3k 7711224d73 app/matrix: matrix.hackerspace.pl: add libera.chat
Apart from this, we also had to manually edit the registration yaml to
add @libera_ and #libera_ prefixes to the allowlists.

Change-Id: If85f58cf3d1291e0bf9099ef13d9397040a47782
2021-05-26 19:46:40 +00:00
q3k b387f57497 app/matrix: matrix.hackerspace.pl: run apppservice-irc identd
This doesn't have to be publicly reachable, as the future
//cluster/identd will dial into the pod directly to access the
appservice's identd.

Change-Id: I139341ead76309a6640eeb9a278462565290dd34
2021-05-26 19:45:22 +00:00
q3k 856b216459 matrix.hackerspace.pl: add secret appservice-irc mappings
These contain a channel key for a secret channel.

We also had to migrate the appservice-irc config to a secret.

Change-Id: I92c7cdf9679f65d9e655e22d690cef2e83180135
2021-05-19 22:04:02 +00:00
q3k 6be8b2e301 matrix.hackerspace.pl: give appservce-irc admin access to q3k and inf
Change-Id: I54334f4e8d1abd037ae2c821cb3569312bd2fe3b
2021-05-19 16:32:29 +00:00
q3k e7f14471e1 matrix.hackerspace.pl: disable bootstrap jobs
Change-Id: I93472c8ca03b9d0a2d4bea1504ec93102d68f258
2021-05-19 16:10:31 +00:00
q3k 4154673593 matrix: appservice-irc: set debugService.enable if needed
This is the case for any IRC server that has ignoreIdleUsersOnStartup
set, because of what seems like an appservice-irc bug.

Change-Id: If5063a3bc2d79c7f2fc79ec7560bf9bfe2b25aba
2021-05-19 16:10:03 +00:00
q3k 25cd650ec9 matrix: add bootstrapJob config flag to appservices
This allows us to bypass the issue where Kubernetes jobs cannot be
updated once completed, so bumping appservice image versions was
painful.

But really, though, this is probably someting that kubecfg/kartongips
should handle.

Change-Id: I2778c5433f699db89120a3c44e55d2fbe2a10015
2021-05-19 16:09:13 +00:00
q3k 8eae454769 matrix: bump appservice-irc
Also drive-by bump appservice-telegram, which was already bumped on
prod.

Change-Id: Ic8222775e7e3dbaa44361e6ccd84bdd6617924c3
2021-05-19 16:07:52 +00:00
q3k 6751d826f1 Merge changes I2afe9e52,Ideb13ba9
* changes:
  app/matrix/appservice-irc: implement passwordEncryptionKey
  app/matrix/appservice-irc: add ignoreIdleUsersOnStartup option
2021-05-19 15:41:55 +00:00
q3k ab1f7dc924 app/matrix: 0x3c: fix secret name
Change-Id: Ifc519c068eb2af4ca1462d438c7b7050d9c0b2d8
2021-05-12 21:07:07 +00:00
q3k c3ca29512a app/matrix: update mautrix image
The old image disappearified from their registry:

httpReaderSeeker: failed open: content at https://dock.mau.dev/v2/tulir/mautrix-telegram/manifests/sha256:dc95be8f9cd7c226686bcd8be52872cdc20de6751b5eb9f10c6db87ec478b1ca not found: not found

This is the current latest image. Production (at least
matrix.hackerspace.pl) has been updated.

Change-Id: I754b13f08b569e717295fb48d36c0e6544438aa4
2021-04-10 11:15:31 +00:00
informatic 37fbff768a app/matrix/appservice-irc: implement passwordEncryptionKey
This allows people to save their NickServ passwords into bridge's
storage. Obviously nobody should trust us tho.

Change-Id: I2afe9e5215cd8f7419e9eab8183789df13e21aac
2021-02-13 20:18:51 +01:00
informatic 3d5bb6f2e9 app/matrix/appservice-irc: add ignoreIdleUsersOnStartup option
This should alleviate an issue of people getting joining and immediately
getting dropped off due to client limit on bridge restarts.

Change-Id: Ideb13ba9930d565ede728d2750d0c7af04746cf1
2021-02-13 19:58:58 +01:00
q3k 32d3eaac01 app/matrix: bump appservice-irc
Already deployed to matrix/appservice-irc.

Change-Id: I906390eaed9a9154b154bc8952412f9fa6708f64
2021-02-13 17:50:56 +00:00
Norbert Szulc 5d784c5861 app/matrix change displayname rules for matrix.0x3c.pl
prefer username as those are more commonly used in this community

Change-Id: Ia9e5394cd672d3f759e89e4b72dc16a5059857b4
2021-02-12 19:35:26 +01:00
q3k 34f56935b9 app/matrix/telegram: re-pin alpine to 3.13
Newer versions of alpine edge repos have a `yq` that behaves oddly:

    $ kubectl -n matrix-0x3c logs -f appservice-telegram-prod-85d66696c6-9drnl -c generate-config
    + apk add --no-cache yq
    fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
    fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
    (1/1) Installing yq (4.4.1-r0)
    Executing busybox-1.31.1-r21.trigger
    ERROR: busybox-1.31.1-r21.trigger: script exited with error 127
    OK: 11 MiB in 15 packages
    + cp /config/config.yaml /data/config.yaml
    + yq r /registration/registration.yaml as_token
    Error: unknown command "r" for "yq"
    Run 'yq --help' for usage.
    + yq w -i /data/config.yaml appservice.as_token
    Error: unknown command "w" for "yq"
    Run 'yq --help' for usage.

This downgrades back to a working yq.

Change-Id: Ifc77bcc88156b02f3ec17e6f84c5615149108777
2021-02-08 17:54:10 +01:00
informatic 95da3d5011 app/matrix: enable labs settings on matrix.hackerspace.pl
This adds an extra tab in profile settings window.

Change-Id: I2a6f162975b7ef6047aea5fdc72ba711084db2d5
2021-02-06 11:55:48 +01:00
informatic babcb8017f app/matrix/matrix.hackerspace.pl: migrate to matrix-ng
Change-Id: I131049da1037d9501a21a900d46929242fd5cba5
2021-01-31 19:07:53 +01:00
informatic fb119aa4f0 app/matrix: backport matrix.metadata(component) into matrix-ng
This is used by some external modules (appservices/instance
definitions). In order to reduce scope of (untested) changes in this
rollout, let's temporarily backport that function into matrix-ng.

Change-Id: Ib1054844391497ef1455b25c7f939c68c628ff09
2021-01-31 19:07:53 +01:00
informatic 356dd6d571 app/matrix/matrix.hackerspace.pl: update appservice-irc-freenode node
Change-Id: Id9c47f61d51291bd10fab3c58c17abddc1fdac17
2021-01-31 18:57:07 +01:00
informatic d6f08fc98f Merge "app/matrix: split matrix-ng into submodules, use kube.Namespace.Contain" 2021-01-31 15:50:54 +00:00
informatic b67ae4893c app/matrix: split matrix-ng into submodules, use kube.Namespace.Contain
matrix-ng split into multiple submodules causes some changes in keys
that might've been used for homeserver/riot configuration customization.

Migration to kube.Namespace.Contain has also caused change in Deployment
selectors (immutable fields), thus needing manual removal of these
first.

This is, as always, documented in lib/matrix-ng.libsonnet header.

Change-Id: I39a745ee27e3c55ec748818b9cf9b4e8ba1d2df5
2021-01-31 12:55:38 +01:00
informatic 0c75256f48 Merge "app/matrix: matrix-ng - synapse deployment cleanup" 2021-01-30 20:58:55 +00:00
informatic 8ec865728e app/matrix: matrix-ng - synapse deployment cleanup
This is a major revamp of our matrix/synapse deployment as a separate
.libsonnet module.

* synapse version bump to 1.25.0
* riot-web version bump to 1.7.18
* Replaced synapse migration hack we used to template configuration with
environment variable replacement done by Kubernetes itself
* Implemented support for OpenID Connect, migration from CAS has been
verified to be working with some additional configuration options
* Moved homeserver signing key into k8s secret, thus making it possible
to run synapse processes without a single data volume
* Split synapse into main process, generic worker and media repository
worker. (latter is the only container using data volume) Both generic
worker and media repository worker is running on a single replica, until
we get proper HTTP routing/loadbalancing
* Riot nginx.conf has been extracted into an external file loaded using
importstr.

Change-Id: I6c4d34bf41e148a302d1cbe725608a5aeb7b87ba
2021-01-30 21:18:51 +01:00
informatic 77351a68c7 Merge changes Ic71cbdce,I097b58ef
* changes:
  app/matrix: cleanup irc bridge registration oneliner
  app/matrix: add wellKnown server integration
2021-01-30 15:34:25 +00:00
informatic ee62857c70 app/matrix: cleanup irc bridge registration oneliner
Change-Id: Ic71cbdce6bd9668754285f863fd987c63ab5386d
2021-01-30 13:10:22 +01:00