Platform services¶
Cluster-wide infrastructure, not environment-specific: one Traefik, one cert-manager, one Prometheus, one Loki, one oauth2-proxy, one Photon. All of it is installed by the platform Argo CD Application (see Argo CD) and shared by tomoda-dev and tomoda-prod.
Each service has its own subfolder under k8s/envs/platform/, and each subfolder contains an application.yaml (Argo CD Application CR) plus, where needed, a values.yaml for Helm overrides.
-
The ingress controller. All HTTP/HTTPS traffic into the cluster lands here first. Exposed on the server's public IP by k3s ServiceLB.
-
Automates TLS. One
letsencrypt-prodClusterIssuer, per-ingress certificates via DNS-01 (proxied prod hosts) or HTTP-01 (everything else). -
Watches
IngressandServiceresources and writes matching records to Cloudflare for thetomoda.lifezone. -
Syncs values from GCP Secret Manager into Kubernetes
Secretobjects via ESOClusterSecretStoreand per-appExternalSecretCRs. -
Google-OAuth gate for admin UIs (Argo CD, Grafana, pgAdmin, Redis Insight, OTA dashboards). Plugs into Traefik as forwardAuth middleware.
-
kube-prometheus-stack: Prometheus, Alertmanager, Grafana, node-exporter, kube-state-metrics, the operator, and the custom
tomoda-alertsPrometheusRule. -
Log aggregation. Alloy tails every pod's logs into Loki (R2-backed); Loki is queried from Grafana.
-
Self-hosted geocoder backing the backend's
PHOTON_URL. Stateful, single replica, 250 Gi PVC, index pulled from R2 (checked every 24h). -
WebSocket fan-out backplane for the backend (
WS_BACKPLANE=nats). Core NATS with no JetStream, so a single replica needs no quorum. -
Serves the custom-metrics API so HPAs can scale on Prometheus metrics. Exposes
tomoda_ws_connections_activefor thetomoda-apiWebSocket-connection HPA. -
text-embeddings-inference(CPU) serving Qwen3-Embedding-0.6B for semantic search. Single replica, 3 Gi memory request (6 Gi limit) to load and hold the model. -
Self-hosted GitHub Actions runners on the cluster via Actions Runner Controller. Ephemeral pods spawn per queued job, scale to 0 between jobs.
-
Runtime CVE scanning of every running image; findings become GitHub issues via
trivy-issue-reporter.
Platform apps documented elsewhere:
| App | What | Page |
|---|---|---|
cnpg |
CloudNativePG operator and Barman Cloud plugin (cnpg-system) |
Postgres (CNPG) |
tempo |
Trace store, R2-backed | Tempo |
pyrra |
SLO controller | SLOs |
blackbox-exporter |
Readiness probes for in-cluster services | Prometheus |
cloudflared |
Tunnel for the synthetics' Loki push (loki-push.tomoda.life) |
Synthetics |
xavia-ota-{dev,prod} |
OTA update servers | Xavia OTA |
trivy-issue-reporter |
Daily CVE triage into GitHub issues | Vulnerability scanning |
Cluster-wide manifests that don't belong to any single service (alert rules, Alertmanager config, dashboards, ESO stores, Traefik middlewares, probes, SLOs, Image Updater) live in k8s/envs/platform/manifests/ and are installed by the separate sys-resources Argo CD Application. See External Secrets for the ClusterSecretStore and Argo CD for Image Updater.