Commit Graph

94 Commits (a6f2ccf344571138371576d32b5dc7b6eb274533)

Author SHA1 Message Date
radex 304515b58b bgpwtf/internet: clean up, use unprivileged nginx
Change-Id: I6f1291c2facf35f4871283c28a4e6f771a3b5102
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1813
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-12-04 20:33:56 +00:00
radex f5b311794e bgpwtf/speedtest: clean up
Change-Id: Iccfc69c82b0c1dd21b1e0debe0089a0426c5fa50
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1812
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-12-04 20:33:46 +00:00
radex 4ffc64d97d kube: add .volume field on PVCs and ConfigMaps
Change-Id: I93eec44bd6df4ecb0044a4797faa9bf6fd26802d
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1811
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-12-04 20:33:37 +00:00
radex 7a4c27d28c kube: clean up (various)
Change-Id: Idc11cf70fa7fd0360f63438270748ef1d9bad989
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1810
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-12-04 20:33:31 +00:00
radex d45584aa6d kube: clean up SimpleIngress
Rename `target_service` to `target` to mirror Service's `target`; rename `extra_paths` to `extraPaths` to follow the camelCase convention used everywhere except for a few places in kube.upstream (assumed to be a mistake)

Change-Id: Icfcb70ef889e3359bf0391c465034817f4b70cce
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1809
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-12-04 20:33:10 +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 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 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 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 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
informatic 7e841065b0 *: post-certmanager manifests update
Change-Id: I745c850268c31777c5722a9833c8152a55615aed
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1512
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-06-19 21:20:44 +00:00
implr 90cf314d1e bgpwtf: cloudflare: remove password
Seems like they aren't actually setting it on their end.

Change-Id: Ia751cd1560196ae44be15f759681dd9d679370da
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1485
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-04-01 16:57:18 +00:00
implr 26a7f5bb56 bgpwtf: peer with cloudflare
Change-Id: I00d040d56610b965d03d5af5cf7f17a5ea7f7b2d
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1484
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-03-28 17:12:52 +00:00
patryk 98604701ab bgpwtf: customer cleanup
Change-Id: Idb2e66a1d75d713fc3c73cc9af41d66883bf6366
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1472
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-03-10 21:15:55 +00:00
q3k 9171451c53 bgpwtf: delegate /29 to customer
Change-Id: I3607580126477560f642ec5d9c4ccba7022de559
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1404
Reviewed-by: informatic <informatic@hackerspace.pl>
2022-11-06 17:05:02 +00:00
q3k 0d22d0bcb6 bgpwtf/m/edge01: allow 10.10.32.0/24 (dcr03 mgmt)
Change-Id: Ide36e7fbcb39c178b0d51dd0da8534c6bf60954b
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1403
Reviewed-by: patryk <patryk@hackerspace.pl>
2022-10-08 18:12:21 +00:00
q3k e1aa63c7dd bgpwtf: add rsh tests, fix startup sequencing
Change-Id: Idba53905d3965db6f805221da3e48548d7a01811
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1340
Reviewed-by: implr <implr@hackerspace.pl>
2022-07-07 23:51:57 +00:00
q3k 957d91180a bgpwtf: edge01: bump nixpkgs, use networkd
Change-Id: I038f9518e090aecc90f464475f29c5b3c1570eff
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1339
Reviewed-by: implr <implr@hackerspace.pl>
2022-07-07 23:51:57 +00:00
q3k d635dc85ce bgpwtf: edge01: fix tests
Change-Id: I66852cc75f3d5a6ce3cc67790c09e248874b0a9b
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1338
Reviewed-by: implr <implr@hackerspace.pl>
2022-07-07 23:51:57 +00:00
q3k 8469691645 bgpwtf: edge01: new customer
Change-Id: I9b871370e310a98848c8266658b17fef17b61011
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1202
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-12-13 22:30:46 +00:00
q3k d602c28df6 bgpwtf: fixup ssh problems
This makes our routers less likely to reject connections when they're
being bruteforced: first, by disabling password auth (which we don't
use, anyway), second by making connection limits a bit less draconian.

Change-Id: I4e1e3b0be85dd5ad07a10610ca28a6f094249d8c
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1174
Reviewed-by: q3k <q3k@hackerspace.pl>
Reviewed-by: implr <implr@hackerspace.pl>
2021-12-13 22:30:46 +00:00
q3k 82fc1318e2 bgpwtf: edge01: repurpose wireguard tunnel for fmt
Change-Id: Ib36048a83641b62210ad0d63b7b7ecda999da542
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1201
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-12-13 22:30:46 +00:00
q3k 767f031898 bgpwtf: fix edge01 DNS blackholing
The grapevine says that people were being fined for not supporting a
punycode domain. This was broken in rsh-unbound, so I had to fix it. I
then also realized we never were reloading unbound, so some changes
might've been slow to propagate.

Change-Id: Ie461a2ba27b5f447654a70f56bd73d3732b256ee
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1180
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-12-08 14:12:07 +00:00
q3k b754fee4e3 bgpwtf: edge01.waw: add new customer network
Change-Id: I057a93d543694300483f690598380329782f2876
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1175
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-12-08 14:12:07 +00:00
q3k a5b0c13228 edge01: deploy kkc wireguard tunnel (never used)
Change-Id: I5f61f00029ac9e86cd4fdcc390d16ec7fa081f51
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1157
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-10-07 18:50:51 +00:00
q3k 9fcce22ef3 bgpwtf/oob: fix markup
Change-Id: I8676fb58ea79d9d37989c1afd03543842cb4fa1b
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1149
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-09-18 11:45:07 +00:00
q3k 81e7fbaadd bgpwtf: edge01: fix ipv4 static routing for customers
Change-Id: I9c34d12a7947c9bb25331e38ea7ee03beede7e47
2021-09-08 23:40:29 +02:00
q3k 11248d88ab bgpwtf: edge01: add new client networks, remove old q3k network, limit nscd
Batch of small changes. Already deployed.

Change-Id: Ieb4f418699f497c7013e617fd7d1827e71a7a415
2021-09-06 12:07:42 +00:00
q3k e3ea97b76b bgpwtf/internet: new consumer ToC/pricelist
Change-Id: Ic7b03b04d59b3134aeff07a649c01e8745c46b1e
2021-08-29 18:19:53 +02:00
q3k 400e03fe00 bgpwtf/machines: allow new customer prefix from hscloud/dcr01sw37
Change-Id: Ieb742d3256aa6dd0c1bb28c298f3d2c41b093712
2021-07-21 14:56:29 +00:00
q3k 14f4a8b762 bgpwtf/machines/tests: fix edge01.waw test for new prefix
520f150134 changed the prefix exported
from a /23 to a /24, this broke this test.

Change-Id: I8e57bb58d816d441a17ec57ecd0881ad4facd38f
2021-07-19 22:12:30 +02:00
q3k 0fc01a969b bgpwtf/machines/modules: fix bird_exporter
v.1.2.5's hash broke, let's just swiftly ignore this and update to
1.2.6.

Change-Id: I19757abeb2f279be6f56ca429441503710ed433f
2021-07-19 22:12:30 +02:00
q3k 65d4bc5bff Merge "bgpwtf: add q3k's anycast subnet" 2021-07-10 13:55:29 +00:00
q3k 1cf2907450 Merge "bgpwtf/oob: document OOB setup" 2021-07-08 13:07:39 +00:00
q3k 1c80bd7563 bgpwtf: allow route with ptp to dcr03sw48
Change-Id: Ia1173deec1cd3bfc00d543c112df06b7b82dfad0
2021-06-30 21:23:24 +00:00
q3k 68e2b18d4d bgpwtf/oob: document OOB setup
Moved from the hackerspace wiki
(https://wiki.hackerspace.pl/staff:network:lte).

Change-Id: I44cc8d1b8d588df2a58874060b5d56e03f36660d
2021-06-21 11:01:29 +00:00
q3k 520f150134 bgpwtf: add q3k's anycast subnet
Change-Id: I66d449c94b27b741e71da047bb1901b8fba6eb80
2021-06-18 21:24:15 +02:00
q3k 87ede25bec bgpwtf/invoice: format for non-eu customers
Change-Id: I42ec23d911cd69a310a6de8ffe5dca5ff1b30f00
2021-05-12 21:09:47 +00:00
q3k fa818da7c6 bgpwtf/invoice: add recurrent billing tool
Change-Id: Ic3cc03d7b04304ae8c7aa76d8bb889ae8c144838
2021-05-06 00:12:53 +02:00
q3k 605aadbfa4 Merge "bgpwtf/invoice: render SP/GTU codes on invoices" 2021-05-05 20:48:12 +00:00
q3k ffb80d0ed6 bgpwtf: add ar's ssh keys to routers
Change-Id: I87247136052b5b7077cb7eed33f13b60b81b898e
2021-04-19 07:11:26 +00:00
q3k 772a133ca1 bgpwtf/invoice: render SP/GTU codes on invoices
Change-Id: I2f47595c67ae0c945fa680b394cb7d5212cd389a
2021-03-27 15:58:03 +00:00
q3k 5d2a70ac92 bgpwtf/machines: add netboot.xyz to bootstrap
This allows us to selectively boot some DC machines into netboot.xyz for
testing.

Change-Id: I5713b220ee986c3584fc68efaa7540bbe99680ba
2021-03-18 19:22:41 +00:00
q3k 225a5c7ee9 nixpkgs: bump
Fixes b/3.

Change-Id: I2f734422cdad00f78956477815c4aea645c6c49e
2021-02-14 14:43:07 +00:00
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 856b284e29 bgpwtf: edge01: add radio rooftop circuit
Change-Id: I07d6f3cb9170e1b8c5c2d8ea429d847ffa87126c
2021-01-21 20:47:42 +00:00
q3k f70b1be78b Merge "invoice: bump year for new databases" 2021-01-19 18:59:41 +00:00