2024-07-30 10:51:34 +03:00
# k-space.ee infrastructure
Kubernetes manifests, Ansible [playbooks ](ansible/README.md ), and documentation for K-SPACE services.
2022-08-16 12:40:54 +03:00
2024-08-03 02:00:48 +03:00
<!-- TODO: Docs for adding to ArgoCD (auto-)sync -->
2024-07-30 10:51:34 +03:00
- Repo is deployed with [ArgoCD ](https://argocd.k-space.ee ). For `kubectl` access, see [CLUSTER.md ](CLUSTER.md#kubectl ).
- Debugging Kubernetes [on Wiki ](https://wiki.k-space.ee/en/hosting/debugging-kubernetes )
- Need help? → [`#kube` ](https://k-space-ee.slack.com/archives/C02EYV1NTM2 )
2022-08-16 12:40:54 +03:00
2025-08-01 19:25:17 +03:00
Jump to docs: [inventory-app ](hackerspace/README.md ) / [cameras ](_disabled/camtiler/README.md ) / [doors ](https://wiki.k-space.ee/en/hosting/doors ) / [list of apps ](https://auth.k-space.ee ) // [all infra ](ansible/inventory.yml ) / [network ](https://wiki.k-space.ee/en/hosting/network ) / [retro ](https://wiki.k-space.ee/en/hosting/retro ) / [non-infra ](https://wiki.k-space.ee )
2022-08-16 12:40:54 +03:00
2024-08-03 02:00:48 +03:00
Tip: Search the repo for `kind: xyz` for examples.
2024-07-30 10:51:34 +03:00
## Supporting services
2025-05-03 15:11:11 +03:00
- Build [Git ](https://git.k-space.ee ) repositories with [Woodpecker ](https://woodpecker.k-space.ee )[^nodrone].
2024-08-03 02:00:48 +03:00
- Passmower: Authz with `kind: OIDCClient` (or `kind: OIDCMiddlewareClient` [^authz]).
2024-07-30 10:51:34 +03:00
- Traefik[^nonginx]: Expose services with `kind: Service` + `kind: Ingress` (TLS and DNS **included ** ).
2022-08-16 12:40:54 +03:00
2025-05-03 15:11:11 +03:00
[^nodrone]: Replaces Drone CI.
2024-07-30 10:51:34 +03:00
### Additional
- bind: Manage _ additional _ DNS records with `kind: DNSEndpoint` .
- [Prometheus ](https://wiki.k-space.ee/en/hosting/monitoring ): Collect metrics with `kind: PodMonitor` (alerts with `kind: PrometheusRule` ).
- [Slack bots ](SLACK.md ) and Kubernetes [CLUSTER.md ](CLUSTER.md ) itself.
2024-08-03 01:49:16 +03:00
<!-- TODO: Redirects: external-dns.alpha.kubernetes.io/hostname + in -extras.yaml: IngressRoute and Middleware -->
2022-08-16 12:40:54 +03:00
2024-07-30 10:51:34 +03:00
[^nonginx]: No nginx annotations! Use `kind: Ingress` instead. `IngressRoute` is not used as it doesn't support [`external-dns` ](bind/README.md ) out of the box.
2024-07-30 12:40:01 +03:00
[^authz]: Applications should use OpenID Connect (`kind: OIDCClient` ) for authentication, whereever possible. If not possible, use `kind: OIDCMiddlewareClient` client, which will provide authentication via a Traefik middleware (`traefik.ingress.kubernetes.io/router.middlewares: passmower-proxmox@kubernetescrd` ). Sometimes you might use both for extra security.
2022-08-16 12:40:54 +03:00
2024-08-15 13:40:22 +03:00
### Network
All nodes are in Infra VLAN 21. Routing is implemented with BGP, all nodes and the router make a full-mesh. Both Serice LB IPs and Pod IPs are advertised to the router. Router does NAT for outbound pod traffic.
See the [Calico installation ](tigera-operator/application.yml ) for Kube side and Routing / BGP in the router.
Static routes for 193.40.103.36/30 have been added in pve nodes to make them communicating with Passmower via Traefik more stable - otherwise packets coming back to the PVE are routed directly via VLAN 21 internal IPs by the worker nodes, breaking TCP.
2026-01-03 05:34:13 +02:00
#### Regenerate networkpolicy-base.yml
It's quite odd there is no better way to generate these.
[regenerate-networkpolicy-base.sh ](regenerate-networkpolicy-base.sh )
2024-08-03 01:59:45 +03:00
<!-- Linked to by https://wiki.k-space.ee/e/en/hosting/storage -->
2024-07-30 10:51:34 +03:00
### Databases / -stores:
- Dragonfly: `kind: Dragonfly` (replaces Redis[^redisdead])
2026-01-05 23:14:00 +02:00
- External (hyperconverged Proxmox) Rook/Ceph: `rook-ceph/storage-classes.yaml` (filesystem storage)[^fs]
2024-07-30 10:51:34 +03:00
- Mongo[^mongoproblems]: `kind: MongoDBCommunity` (NAS* `inventory-mongodb` )
2025-12-29 00:13:35 +02:00
- Garage S3[^nominio]: buckets/credentials created with CLI and usually stored in secretspace/kube #TODO: link to docs, kube claim instead?
2024-07-30 10:51:34 +03:00
- MariaDB*: search for `mysql` , `mariadb` [^mariadb] (replaces MySQL)
- Postgres*: hardcoded to [harbor/application.yml ](harbor/application.yml )
2025-04-20 17:43:46 +03:00
- Seeded secrets: `kind: SecretClaim` (generates random secret in templated format)
2025-05-03 14:49:30 +03:00
- Secrets in git: https://git.k-space.ee/secretspace (members personal info, API credentials, see argocd/deploy_key.pub comment)
2022-08-16 12:40:54 +03:00
2024-07-30 10:51:34 +03:00
[^mariadb]: As of 2024-07-30 used by auth, authelia, bitwarden, etherpad, freescout, git, grafana, nextcloud, wiki, woodpecker
2022-08-16 12:40:54 +03:00
2025-04-20 17:08:09 +03:00
[^redisdead]: Redis has been replaced as redis-operatori couldn't handle itself: didn't reconcile after reboots, master URI was empty, and clients complained about missing masters. Dragonfly replaces KeyDB.
2022-08-16 12:40:54 +03:00
2024-07-30 10:51:34 +03:00
[^mongoproblems]: Mongo problems: Incompatible with rawfile csi (wiredtiger.wt corrupts), complicated resizing (PVCs from statefulset PVC template).
2022-08-16 12:40:54 +03:00
2025-12-29 00:13:35 +02:00
[^nominio]: Replaces Minio S3.
2026-01-05 23:14:00 +02:00
[^fs]: Replaces Longhorn and proxmox-csi.
2025-12-29 00:13:35 +02:00
2024-07-30 10:51:34 +03:00
***
_This page is referenced by wiki [front page ](https://wiki.k-space.ee ) as **the ** technical documentation for infra._