Commit graph homek8s/infrastructure
Author SHA1 Message Date
Lance Walters
c773a3e2a9 node-io: bound the writeback backlog so dind writeback cannot stall etcd 2026-10-26 16:35:03 -04:00
Lance Walters
d5d1d2882a cnpg: widen operator leader-election window + adopt the operator into Flux
Shared-NVMe contention on the T480, not a uniformly slow disk: etcd WAL fsync
has 158 samples >8.192s over 41d while 99.9% land <=32ms, and all 8 hours with
>=2s stalls have CI build I/O on the same PM991 NVMe (worst single stall
10.39s, dind data-root and forgejo-data share /dev/nvme0n1p3 with the WAL).
Each stall blows the operator's 5s lease-renewal HTTP timeout and
controller-runtime fatals with "leader election lost" (223 restarts in 45d).
Lease 60s / renew 45s rides out a 10.4s stall instead of restarting the
operator; safe at replicas: 1, there is no second holder to split-brain
against. CNPG's flags are integer seconds and it has no resource-lock-timeout
flag, unlike the Cilium operator.

The operator was installed by hand, so a kubectl patch would be lost on the
next reinstall. Vendor the pinned 1.30.0 release manifest under
infrastructure/databases/base and own it with its own Flux Kustomization
(prune: false -- the bundle carries the 11 CNPG CRDs, and pruning those would
delete every Cluster). The patch also declares the pre-existing live deltas
that upstream does not ship: the overlay API env (10.10.0.2:6443), the
500m/512Mi limits and the 3min startup probe -- adopting upstream raw would
have silently reverted all three.
2026-10-26 15:38:42 -04:00
Lance Walters
bd5057cdfa cilium: widen operator leader-election window for NVMe fsync stalls
Single-node etcd on the T480's PM991 NVMe shows WAL fsync spikes >8s under
dind build I/O. apiserver stalls then blow the operator's 5s lease-renewal
HTTP timeout and it fatals with 'Leader election lost, shutting down'
(204 restarts in 41d). Lease 60s / renew 45s / lock timeout 20s rides out
a stall instead of restarting the operator.
2026-10-26 14:48:58 -04:00
Hermes Agent
6c55f5f9d6
feat(cilium): enable bpf-lb-external-clusterip for WG spokes
Clients outside the cluster (WireGuard spokes: phone, SG VPS, laptop) could
reach node IPs, the API server and pod IPs but not ClusterIPs: Cilium
swallowed the service packets on the hub before any route applied, because
bpf-lb-external-clusterip defaulted to false.

Set bpf.lbExternalClusterIP: true so the HelmRelease renders
bpf-lb-external-clusterip=true.
2026-09-18 20:37:18 -04:00
Sirius DevOps
2fc8201719
feat: install Gateway API v1.5.1 CRDs (Cilium 1.20 requires referencegrants v1)
Cilium 1.20.1's operator refuses to create the Gateway controller when a
required CRD lacks v1:
  CRD "referencegrants.gateway.networking.k8s.io" does not have version "v1"

The cluster's Gateway API CRDs predate v1.5.x and only serve referencegrants
v1beta1. Vendor the v1.5.1 standard channel (referencegrants, tlsroutes,
backendtlspolicies, grpcroutes, listenersets etc. all at v1) and manage it
with a dedicated Flux Kustomization with prune=false so CRDs are never
auto-deleted.
2026-09-15 01:22:46 -04:00
Sirius DevOps
f84009c234
fix: align Gateway hostNetwork node selector with Envoy nodeSelector
gatewayAPI.hostNetwork.nodes.matchLabels was 'gateway: "true"' (matches
siriussec only), while envoy.nodeSelector is
'node-role.kubernetes.io/gateway: "true"' (matches linode only). The
Gateway listener was scheduled for host-network on a node where Envoy
does not run, so no 8080 listener was ever programmed and the public
Gateway had no dataplane on linode.

Align the hostNetwork selector to the Envoy's actual node label so the
listener binds on linode.
2026-09-15 01:13:18 -04:00
Sirius DevOps
6fd2767ca3
fix: bump Cilium to 1.20.1 — 1.19.7 still crashes on TLSRoute v1alpha2
Cilium 1.19.x operator unconditionally registers a field indexer for
TLSRoute/v1alpha2 and treats the error as fatal. The cluster's TLSRoute
CRD (standard channel from Gateway API v1.5.x) marks v1alpha2 as not
served. Cilium 1.20+ (PR #45251) fixed the indexer to not require
v1alpha2 served. Chart bump: 1.19.7 -> 1.20.1.
2026-09-15 00:29:44 -04:00
Sirius DevOps
e2f1a260c9
fix: use HelmRelease v2 API (cluster only serves v2, not v2beta2) 2026-09-15 00:26:20 -04:00
Sirius DevOps
3eadc3acda
feat: add Cilium HelmRelease to Flux-managed infrastructure
Wires ../networking/cilium (HelmRelease + HelmRepository + values
ConfigMap) into the infrastructure kustomization so Flux deploys
Cilium 1.19.7 and upgrades the crashing 1.18.13 operator.
2026-09-15 00:23:47 -04:00
Sirius DevOps
9b93278760
feat: internal-only Cilium Gateway on WG overlay for private services
Add a second Gateway listening on port 8081, namespace-scoped to
`internal`. Only HTTPRoutes in the `internal` namespace can attach,
so grafana and other private services are not reachable from public
HTTPRoutes.

The listener is on the WG overlay (siriussec 10.10.0.2 + linode
10.10.0.5, both `gateway=true`). No public IP, no LAN route — only
peers on 10.10.0.0/24 can reach it.

Also wires the new `internal` gateway into Flux via
infrastructure/home/kustomization.yaml.
2026-09-15 00:18:58 -04:00
Sirius DevOps
9209ea54a7
fix: upgrade Cilium to 1.19.7 to resolve operator CrashLoopBackOff
Cilium operator 1.18.13 crashes on startup with:
  no matches for kind TLSRoute in version gateway.networking.k8s.io/v1alpha2

The TLSRoute CRD on the cluster only has v1 (no v1alpha2). Cilium 1.19+
fixes the gateway API field indexer to work with the v1/v1alpha3 TLSRoute
layout. Fixes the 3-day operator outage.
2026-09-15 00:08:05 -04:00
Sirius DevOps
c03c23bc4c
cillium gateway config switch to linode node as gateway 2026-09-14 23:47:48 -04:00
Sirius DevOps
20f967ffa3
Switch Cilium to native routing over WireGuard.
Pod CIDRs ride the existing hub-and-spoke mesh (no VXLAN).
Envoy cross-node handshake is still identity-8; Gateway stays on siriussec.
2026-09-11 21:54:13 -04:00
Sirius DevOps
cbe0575453
Pin Cilium Gateway hostNetwork to siriussec.
Cilium Envoy cannot reach overlay backends on another node
(503 cx_connect_fail). Same-node listener next to workloads works;
cloudflared origins point at the T480 LAN:8080.
2026-09-11 00:37:41 -04:00
Sirius DevOps
0ee4062413
Add Forgejo app and CNPG cluster (1 replica).
Operator is installed on-cluster; DB restored from Pi dump; repo data
rsynced onto local-path PVC. HTTPRoute kept for Gateway; public origin
is NodePort until Cilium hostNetwork Envoy can reach overlay backends.
2026-09-11 00:08:31 -04:00
Sirius DevOps
f9189482e7
Initial HomeK8s tree matching lab GitOps layout.
Storage and Gateway apply with kubectl -k until Forgejo+Flux.
2026-09-10 23:38:04 -04:00