Commit Graph

164 Commits (master)

Author SHA1 Message Date
radex 9da9df6b7a cluster/kube: admitomatic, admins, owners changes
Change-Id: Ia2f167d84cff999c9ab273db16609d1dec740f25
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1801
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-11-26 15:50:57 +00:00
radex 0e12849717 kube: use ns.Contain() for postgres and redis
This is purely for consistency. While it's objectively more "magic" than the previous convention, newcomers may be asking themselves how come namespace is passed to kube objects using ns.Contain(), but to these custom objects via cfg.namespace.

Change-Id: I061c27c74213d5481b2c7e0afd5f316e84335786
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1808
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:39:30 +00:00
radex 37991744d8 kube: standardize convention for passing postgres options
Declare options when creating postgres {}, then pass env by taking from postgres's cfg and svc. This is both to reduce chance of making a mistake, and to improve copy-pasteability of jsonnets

Change-Id: Ief16a6825af64795f3b10e1e617b96c3d1c2a578
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1807
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:39:18 +00:00
radex 1439fde1ba kube: standardize top.secretRefs convention
Introduce a convention of declaring a secretsRefs:: object below cfg:: for containing all secretKeyRefs. The goal is to self-document all secrets that need to be created in order to deploy a service

Change-Id: I3a990d54f65a288f5e748262c576d2a120efd815
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1806
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:39:11 +00:00
radex c995c212d2 kube: standardize on a `local top = self` convention
A convention is introduced to specify `local top = self` declaration at the top of an app/service/component's jsonnet, representing the top-level object. Reasoning is as following:

- `top` is more universal/unambiguous than `app`
- `top` is usually shorter than $NAME
- a conventional `top` instead of $NAME (coupled with other conventions introduced) makes app jsonnets wonderfully copy-paste'able, aiding in learning and quickly building

Change-Id: I7ece83ce7e97021ad98a6abb3500fb9839936811
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1805
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:38:59 +00:00
radex 99ed6a7abb kube: standardize on a `local ns` convention
A convention is introduced to specify the kube.Namespace object in a deployment as a `local ns` instead of an `ns:` or a `namespace:` for these reasons:

- non-cluster admins cannot create new namespaces, and we've been moving in the direction of specifying objects that require cluster admin permissions to apply (policies, role bindings) in //cluster/kube/k0 instead of in the app jsonnet
- namespace admins CAN delete the namespace, making `kubecfg delete` unexpectedly dangerous (especially if a namespace contains more than just the contents of the file being applied - common with personal namespaces)
- `.Contain()` is a common operation, and it shows up in lines that are pretty long, so `ns.Contain()` is preferable to `app.ns.Contain()` or `service.namespace.Contain()`

Change-Id: Ie4ea825376dbf6faa175179054f3ee3de2253ae0
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1804
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:38:44 +00:00
radex 36964dca3b kube: clean up PersistentVolumeClaims
There's no difference as far as jsonnet is concerned, but it may confuse newbies, as Service and SimpleIngress use double colon for its top-level kube helpers. This also removes any ambiguity as to whether this is manifested in final JSON. So we can make that a convention.

Change-Id: I01ad4ea63f4d5d8ee6e5d41c79637ba186548c6f
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1803
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:37:53 +00:00
radex 8b8f3876a9 kube: add target:: convenience field to Service
Change-Id: If69116d93b6074136a36d98973e1aa997e2ebbef
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1802
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-24 20:37:48 +00:00
radex 6e0041d401 hswaw/ldapweb: deploy latest; add radex to owners
Change-Id: Ib2c90bcc2e0e782f957d92b36a9413f1c1f87dc2
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1799
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-11-23 19:45:00 +00:00
radex f28cd62c0e *: Simplify kube.PersistentVolumeClaims
Change-Id: I0a3e44de9f1c4db146fd1e493741f5fe381da3ae
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1768
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-18 12:36:00 +00:00
radex 527386ab0c hswaw/teleimg: RIP lelegram
Change-Id: Iea1acac5826519c63ab7da1955972544f2098ce0
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1793
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-18 12:34:38 +00:00
radex 63328a353a hswaw/cebulacamp: migrate away from mirko.libsonnet
Change-Id: I208ff1eec8ead60ebdc1c8a52063bfe383eaaa6f
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1792
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-11-18 11:19:30 +00:00
informatic 6963e8b96b hswaw/paperless: fix ingestion failure for invoices from new generator
https: //ocrmypdf.readthedocs.io/en/latest/advanced.html#rendering-and-rasterizing-options
Change-Id: I88e3e7cbf1c97f54004df50f7626cf6c74a839ee
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1787
Reviewed-by: radex <radex@hackerspace.pl>
2023-11-16 22:36:44 +00:00
informatic 13e6052b93 hswaw/beyondspace: fix https redirect pollution for local non-https services
Change-Id: I86505b571695e1bbcfccf869817f627140d7b596
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1786
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-11-16 22:36:44 +00:00
informatic d0920a5a9a hswaw/checkinator: implement unclaimed devices listing
Change-Id: Ieecaf44927b7949c6e16dabea3a84e3bd80d3b7f
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1785
Reviewed-by: vuko <vuko@hackerspace.pl>
Reviewed-by: implr <implr@hackerspace.pl>
2023-11-16 22:36:44 +00:00
informatic 8abe2023dc hswaw/customs: sensible webpage for unknown vhosts, beyondspace branding
Change-Id: Ie73f8abc3c596f82bb787cac66b454519fe9621f
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1784
Reviewed-by: vuko <vuko@hackerspace.pl>
2023-11-16 22:36:44 +00:00
informatic ab299d4b9b hswaw/customs: avoid major rebuilds, nixpkgs deprecations, update arcade
Change-Id: I6f2d15e2a6b8f9189a92ab88658e3235ed119c48
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1729
Reviewed-by: vuko <vuko@hackerspace.pl>
2023-11-16 22:36:44 +00:00
radex 29a96ddcf7 hswaw/ldapweb: deploy
Change-Id: I1447ea050cf51584a7d25bc283fe2b55fc4992f5
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1746
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-30 21:35:17 +00:00
radex caf65fcaaf *: Kill frab, smsgw, toot, covid-formity, voucherchecker
Change-Id: I763c758994008db38b47a7e61d3f1b503685aba6
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1750
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-30 19:08:23 +00:00
radex f5844311eb */kube: Add kube.SimpleIngress
Change-Id: Iddcac629b9938f228dd93b32e58bb14606d5c6e5
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1745
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-28 17:55:48 +00:00
q3k 56df80cf24 hswaw/site: deploy
Remove spurious hspki_disable, now that mirko is ripped out.

Change-Id: I277869e58804cc79bee84334a7abc93c3593c82e
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1748
Reviewed-by: radex <radex@hackerspace.pl>
2023-10-28 17:47:11 +00:00
q3k 4768e2ff32 hswaw/capacifier: deploy
1. Fix spurious -hspki_disable call now that mirko has been ripped out.
2. Build pure/static binary.

Change-Id: Ibe05f18f23d0794eb1a839064474112e004df824
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1747
Reviewed-by: radex <radex@hackerspace.pl>
2023-10-28 17:47:07 +00:00
elia 5cd3d5299c hacklock: fix documentation
Change-Id: I95d60bf004bd33b91b392cda927794b7dc275b52
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1730
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-19 23:43:43 +00:00
radex 401aa5e754 hswaw/ldapweb: update to latest, add service user
Change-Id: I2cc20d35d0a141bc2ea1948942f9518c84e7ea41
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1727
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-10-16 19:34:21 +00:00
informatic 0bb2fcaa32 hswaw/paperless: upgrade postgres to 15.4, paperless-ngx to 1.17.4
Change-Id: I790f306cf2a7837e11e035615862cf00641d5c96
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1699
Reviewed-by: radex <radex@hackerspace.pl>
2023-10-16 12:02:07 +00:00
radex 924d0035fd *: Fix code.hackerspace.pl references
Change-Id: I677cbf743c524bf43cd012579642c34c846f4bcc
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1722
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-10-11 21:01:13 +00:00
radex 0776a79df3 cluster/kube: Centralize namespace admin RoleBindings
Change-Id: Iec3505b2f4a1647e67cf47cf189c77534b5be6ac
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1696
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-10 17:34:22 +00:00
q3k aafef3373d hswaw/machines/sound: add blitzloop, fix prod diff
Change-Id: I10f9659455842e5a8904183b8929be16c2a633fe
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1633
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-10 11:01:24 +00:00
q3k 63ce423ebb hswaw/site: post-deploy changes
This deploys the changes in Id64cccadcd1e109035ed09f62086772fa615dd72
and I34163bbb62ba792d359a5f5e72de1024c0109eab .

Turns out the site actually serves at new.hackerspace.pl and is being
proxy-passed from boston-packets, as that for legacy reasons still has
to live at hackerspace.pl.

Change-Id: Ieaa3e8b6f9c4ced14db83c121e30c9cbaa416b00
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1700
Reviewed-by: radex <radex@hackerspace.pl>
2023-10-10 06:06:06 +00:00
radex a28fa4d7f2 hswaw/site: remove mirko dependency
Change-Id: Id64cccadcd1e109035ed09f62086772fa615dd72
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1690
Reviewed-by: q3k <q3k@hackerspace.pl>
Reviewed-by: radex <radex@hackerspace.pl>
2023-10-09 21:23:14 +00:00
radex d318d7e6d4 hswaw/capacifier: remove mirko dependency
Change-Id: I3afbe1857c321ac6db1255d8a2fe1d9aa3da5c12
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1689
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-09 21:23:07 +00:00
radex 3ca8454555 hswaw/capacifier: migrate deployment away from mirko
Change-Id: Ic15945ae0489cfc3026f4cb11123b8e6b575d471
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1688
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-09 21:22:55 +00:00
radex a364934d33 hswaw/site: migrate away from mirko
Change-Id: I34163bbb62ba792d359a5f5e72de1024c0109eab
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1631
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-10-09 21:10:10 +00:00
informatic a7af16d37a hswaw/machines/customs: add htpasswd file support, expose label
This allows for generic service access to hswaw LAN sites.

Change-Id: I2b290b19ae83496d6b878005ae1c57b0d3955e73
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1603
Reviewed-by: vuko <vuko@hackerspace.pl>
2023-10-08 21:12:07 +00:00
radex d60a68d4f3 hswaw/ldapweb: bump app, simplify config
Change-Id: Ia1a0097c097c8d75b7123088b89b51b4cf5ab46c
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1632
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-09-24 14:56:13 +00:00
q3k 94d96497b5 hswaw/site: implement recurring events
Change-Id: Ib3c570d058141c4d8441801010f0f1755ccfc0e7
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1624
Reviewed-by: radex <radex@hackerspace.pl>
2023-09-22 22:50:39 +00:00
q3k 937722e465 hswaw/ldapweb: give admin rights to radex
Change-Id: I5d0ce4b500e7d9c9750dc5f306ea182013362838
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1627
Reviewed-by: radex <radex@hackerspace.pl>
2023-09-22 22:49:05 +00:00
q3k 80cee0a987 hswaw/site: deploy
Already contains https://gerrit.hackerspace.pl/1624

Change-Id: I248c2f1653a3423d7dfc6ca5374229f072e111dc
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1626
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 22:23:00 +00:00
q3k 88bec7a3c3 capacifier: lol, lmao even
This was never deployed. It is now.

It was broken. It is less now.

Change-Id: I37bcdc5d5d1ffc3484aadecd2226d41aea49bca4
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1625
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 22:22:47 +00:00
radex f3d42d6ddc hswaw/site: add "upcoming events" section
Change-Id: Ic5d36a7ff35c210aff3b3c451e6f0024ed20e896
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1563
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 22:19:11 +00:00
radex b8d4a8a902 ldapweb: migrate from mirko to standalone
Change-Id: I169598232b39b99bfd2d4ff3799b44083ba77e84
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1623
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 21:54:20 +00:00
radex a7c36ed9f3 ldapweb: bump image and config
Change-Id: I5dd24c3dca84f191c45d453f31812f2091d3036c
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1622
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 21:54:20 +00:00
q3k 97b5cd7b58 go: re-do the entire thing
This is a mega-change, but attempting to split this up further is
probably not worth the effort.

Summary:

1. Bump up bazel, rules_go, and others.
2. Switch to new go target naming (bye bye go_default_library)
3. Move go deps to go.mod/go.sum, use make gazelle generate from that
4. Bump up Python deps a bit

And also whatever was required to actually get things to work - loads of
small useless changes.

Tested to work on NixOS and Ubuntu 20.04:

   $ bazel build //...
   $ bazel test //...

Change-Id: I8364bdaa1406b9ae4d0385a6b607f3e7989f98a9
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1583
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 21:50:19 +00:00
q3k 603b4f7293 hswaw/kube: add radex to admins
Change-Id: I4f60b139bb86b52399ad84a5373ac5e1eb8828f9
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1621
Reviewed-by: radex <radex@hackerspace.pl>
2023-09-22 20:44:29 +00:00
informatic 69dd2bfd2a hswaw/paperless: grant access to zarzad *and* paperless-admin groups
Change-Id: I622ee8818da2097914cf0da433e3832d680286db
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1587
Reviewed-by: arsenicum <arsenicum@hackerspace.pl>
2023-09-17 22:33:19 +00:00
radex 8036d7f4da hswaw/site: update README, fix non-breaking whitespace and nitpicks
Change-Id: Id9dac11a1b4f2ac527dacf96e3b5c6fb79f1f3a4
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1561
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-02 16:35:40 +00:00
radex 6715080ebc doc/codelabs: stub of bazel-go.md
Change-Id: Icf408f9edddfb5e446b2675485c6f9e17ff7357a
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1564
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-02 16:32:48 +00:00
q3k b6504238e7 *: add gomod placeholders for generated files
Change-Id: I8a4824ff31590185cd45fd43cc065bb8e2fa7bb2
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1580
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-01 16:50:48 +00:00
q3k 7459bbcd89 hswaw/kube: give ar prod access
Change-Id: I1d03232389a53f7e3a52a3f695071e719482355b
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1544
Reviewed-by: ar <ar@hackerspace.pl>
2023-08-17 12:40:32 +00:00
ar 844b9b4353 hswaw/site: update deployment
Change-Id: If9a652956743e69cdb822b8686729b389b269e34
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1539
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-07-24 13:49:33 +00:00