1
0
Fork 0
Commit Graph

739 Commits (cc769a56f308a52589e2c8d07ed5837334649b81)

Author SHA1 Message Date
q3k cc769a56f3 bgpwtf: move tests from eoip to gretap
This removes our dependency on a userspace EoIP implementation that is
mildly broken, and that doesn't build correctly on new gcc versions.

Change-Id: I404c79585336ebaf3bc1761b54ee2433f0841324
2021-02-14 10:54:09 +00: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
informatic 5c08bb9197 Merge "devtools/issues: add mailing support" 2021-02-09 19:38:53 +00:00
informatic 054c5b47d6 devtools/issues: add mailing support
Resolves b/15

Change-Id: I53a4057ff428219ae1d4928db74eaa2e8bda6651
2021-02-09 09:59:59 +00:00
informatic 1f717993e5 Merge "kube/postgres: add extra options configuration option" 2021-02-09 08:34:48 +00:00
informatic 3b8f6675b1 kube/postgres: add extra options configuration option
Change-Id: I674740872d9540329711cad2b05007215f90bd9b
2021-02-08 22:44:56 +01:00
q3k 78d6f11cb2 Merge "cluster/admitomatic: allow whitelist-source-range" 2021-02-08 17:21:59 +00: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
q3k c9f48fee70 gerrit: integrate with b.hackerspace.pl
Already deployed on prod. Example: b/1337

Change-Id: Ia1bd038a0fc65ad9ddba74e515c113b5421bdfff
2021-02-08 15:10:14 +00:00
q3k 877cf0af26 🅱️
Fixes b/8

Change-Id: I5a5779c3688451d89c0601dc913143d75048c9f6
2021-02-08 15:10:11 +00:00
q3k 943ab5b1a6 cluster/admitomatic: allow whitelist-source-range
Without this, cert-manager get stuck.

Deployed to prod.

Change-Id: I356cd44f455b6f4aecea9ae396f6a05e1a727859
2021-02-07 23:35:28 +00:00
q3k f40c9249ce cluster/kube: allow system:admin-namespaces to modify ingresses
This will permit any binding to system:admin-namespaces (eg. personal-*
namespaces, per-namespace extra admin access like matrix-0x3c) the
ability to create and updates ingresses.

Change-Id: I522896ebe290fe982d6fe46b7b1d604d22b4f72c
2021-02-07 19:24:43 +00:00
q3k 41bbf1436a cluster/kube: deploy admitomatic webhook
This has been (succesfully) tested on prod and then rolled back.

Change-Id: I22657f66b4aeaa8a0ae452035ba18a79f4549b14
2021-02-07 19:19:23 +00:00
q3k 3c5d836c56 cluster/kube: deploy admitomatic
This doesn't yet enable a webhook, but deploys admitomatic itself.

Change-Id: Id177bc8841c873031f9c196b8ff3c12dd846ba8e
2021-02-07 19:19:02 +00:00
q3k 3ab5f07c64 cluster/admitomatic: build docker image
Change-Id: I086a8b17a4dc7257de1bae3a6f0c95400af7e115
2021-02-07 19:18:53 +00:00
q3k 5d67d0c8fc kube/prototext.libsonnet: implement manifestProtoText
This hairy little ball of recursive object manifestation allows emitting
prototext directly from jsonnet.

Change-Id: I8237c629862cfcdf32ca250fba9eda9926c4f9b4
2021-02-07 19:18:29 +00:00
informatic f19ae1e662 Merge "devtools/issues: redmine deployment" 2021-02-06 23:22:15 +00:00
informatic 75a5fcbffb Merge "app/matrix: enable labs settings on matrix.hackerspace.pl" 2021-02-06 23:20:22 +00:00
q3k c80321d17e Merge "cluster: add admitomatic CA/certificate" 2021-02-06 23:18:59 +00:00
informatic 0572fff9a4 devtools/issues: redmine deployment
Change-Id: I71956c4132bf2063e9fc41eb24c4f37657b8fd9d
2021-02-06 22:23:53 +01:00
q3k 04604b2aae cluster: add admitomatic CA/certificate
Change-Id: Idb32dc38b897aa266b6d2d6fd57a5e38b47db7fc
2021-02-06 17:18:58 +00: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 f4a6a56662 cluster/kube/k0: add issues.hackerspace.pl crdb user
Change-Id: If78f795e0e35360b65c666e6b217037fc34a2ccf
2021-02-01 21:32:25 +01:00
informatic 3b8a43f35d cluster/kube/k0: add issues.hackerspace.pl ceph s3 user
Change-Id: If5eef3404bdc08ded88e46f45bad0f9abcdb0f1c
2021-02-01 21:19:59 +01:00
informatic 7f8f3e9f9c ops/sso: upgrade sso-v2
Change in sso-v2 unifies id_token and userinfo endpoint handling - now
groups, nickname, email and preferred_username keys are present in
id_tokens as well.

https://code.hackerspace.pl/informatic/sso-v2/commit/?id=c4c810cd255a7bfcab5ced3fb88c8b311b518c34

Change-Id: Ib22994edc067fd83701590182f8096f6fca692ba
2021-02-01 17:03:27 +01:00
informatic 65f97238e3 Merge changes Ic148ff25,I131049da,Ib1054844,Id9c47f61
* changes:
  kube/redis: fix /data partition permissions
  app/matrix/matrix.hackerspace.pl: migrate to matrix-ng
  app/matrix: backport matrix.metadata(component) into matrix-ng
  app/matrix/matrix.hackerspace.pl: update appservice-irc-freenode node
2021-02-01 11:14:35 +00:00
q3k 68c4338004 Merge "ops/sso: move jsonnets to kube/" 2021-01-31 22:12:46 +00:00
informatic 2759eb7a54 kube/redis: fix /data partition permissions
This has been encountered when introducing redis in our production
matrix deployment. /data partition is owned by root:root by default
otherwise.

Change-Id: Ic148ff25837c6e8da394a5124556481343ea2873
2021-01-31 20:07:29 +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
q3k 9e3ca9c841 ops/sso: move jsonnets to kube/
This is in preparation for moving the sso source code into hscloud.

Change-Id: I4325df617dc82c17fb4c96762743f0b70122976f
2021-01-31 15:52:06 +01:00
q3k 2fbd0710f5 Merge changes I46da0fc4,Ib187de6d
* changes:
  cluster/admitomatic: finish up service
  cluster/admitomatic: finish up ingress admission logic
2021-01-31 11:56:34 +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
q3k c6118649ab cluster/admitomatic: finish up service
This turns admitomatic into a self-standing service that can be used as
an admission controller.

I've tested this E2E on a local k3s server, and have some early test
code for that - but that'll land up in a follow up CR, as it first needs
to be cleaned up.

Change-Id: I46da0fc49f9d1a3a1a96700a36deb82e5057249b
2021-01-31 12:18:16 +01:00
q3k 5d2c8fcda0 cluster/admitomatic: finish up ingress admission logic
This gives us nearly everything required to run the admission
controller. In addition to checking for allowed domains, we also do some
nginx-inress-controller security checks.

Change-Id: Ib187de6d2c06c58bd8c320503d4f850df2ec8abd
2021-01-31 12:18:16 +01:00
informatic 0c75256f48 Merge "app/matrix: matrix-ng - synapse deployment cleanup" 2021-01-30 20:58:55 +00:00
q3k 857903b6c6 Merge "cluster/admitomatic: implement basic dns/ns filtering" 2021-01-30 20:39:47 +00:00
q3k 190feb37b0 .bazelrc: switch over to PY3 (rules_docker is now fully PY3 compliant)
Change-Id: I53edb8eae81779d5b8cea36e3bec4c05ca2c6e0d
2021-01-30 20:30:48 +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
q3k 649565324b cluster/admitomatic: implement basic dns/ns filtering
This is the beginning of a validating admission controller which we will
use to permit end-users access to manage Ingresses.

This first pass implements an ingressFilter, which is the main structure
through which allowed namespace/dns combinations will be allowed. The
interface is currently via a test, but in the future this will likely be
configured via a command line, or via a serialized protobuf config.

Change-Id: I22dbed633ea8d8e1fa02c2a1598f37f02ea1b309
2021-01-30 19:19:35 +01:00
q3k cc2ff79f01 ops/monitoring: move grafana to sso.
Change-Id: Ib2ecf6820454a160834db2ac212b31d9d5306972
2021-01-30 17:26:47 +01:00
q3k d82807e024 Merge changes I84873bc3,I1eedb190
* changes:
  ops/monitoring: deploy grafana
  ops/monitoring: scrape apiserver, scheduler, and controller-manager
2021-01-30 16:22:44 +00:00
informatic aadb47b3c5 Merge "ops/sso: "the hackerspace oidc/oauth2 provider" deployment" 2021-01-30 16:21:45 +00:00
informatic bd36d96efb Merge "kube/postgres: expose cfg.initdbArgs" 2021-01-30 15:34:35 +00: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 1816f58448 kube/postgres: expose cfg.initdbArgs
This option allows easy customization of certain initial database
properties, like encoding or collation. See:
https://www.postgresql.org/docs/9.5/app-initdb.html

Adding this option in already existing deployments will only cause
postgres pod restart, but no data loss or schema changes!

Intended to be used in further matrix deployment cleanups.

Change-Id: I49a017c21a228f983bea6bafa7dac962a75d05c9
2021-01-30 13:14:37 +01:00
informatic ee62857c70 app/matrix: cleanup irc bridge registration oneliner
Change-Id: Ic71cbdce6bd9668754285f863fd987c63ab5386d
2021-01-30 13:10:22 +01:00