Planned think cluster rebuild: OpenBao-issued CAs, dual-stack, unique cluster identity, cluster domain #14

Closed
opened 2026-11-05 16:59:32 +00:00 by ginjiruu · 8 comments
Owner

Part of lab/machine-configs#7. Also carries settings for lab/clusters#1668.

The think cluster runs no real workloads today, so this is the cheapest moment it will ever have for settings that can only be set at creation. OpenBao is a host service and is untouched by the rebuild.

Set at creation

  • CAs from pki-k3s-think (k3s custom CA issue)
  • Dual-stack: k3s dual-stack must be configured at first start (docs.k3s.io/networking/basic-network-options). Give each think a static ULA address from machine-configs so it works on-link with an IPv4-only router. Prove on the harness first; if Cilium dual-stack fights back, stay IPv4-only.
  • Unique Cilium cluster-name/cluster-id (both clusters are default/0 today; ClusterMesh needs unique values)
  • --cluster-domain think.int.animeteamspeak.moe

Done when

  • Dual-stack proven (or ruled out) on test-01
  • think rebuilt with all of the above; LINSTOR/DRBD and kured verified after
Part of lab/machine-configs#7. Also carries settings for lab/clusters#1668. The think cluster runs no real workloads today, so this is the cheapest moment it will ever have for settings that can only be set at creation. OpenBao is a host service and is untouched by the rebuild. ## Set at creation - CAs from `pki-k3s-think` (k3s custom CA issue) - **Dual-stack**: k3s dual-stack must be configured at first start (docs.k3s.io/networking/basic-network-options). Give each think a static ULA address from machine-configs so it works on-link with an IPv4-only router. Prove on the harness first; if Cilium dual-stack fights back, stay IPv4-only. - Unique Cilium `cluster-name`/`cluster-id` (both clusters are `default`/0 today; ClusterMesh needs unique values) - `--cluster-domain think.int.animeteamspeak.moe` ## Done when - [ ] Dual-stack proven (or ruled out) on test-01 - [ ] think rebuilt with all of the above; LINSTOR/DRBD and kured verified after
Author
Owner

Rebuild dependency, 2026-11-07: OpenBao (host service, #8) has auth/kubernetes-think configured against today's think cluster (kubernetes_host=https://10.10.1.20:6443, CA k3s-server-ca@1793554271). It is used by the hourly snapshot CronJob in flux-clusters clusters/think/openbao-snapshot, and will be by ESO.

After the rebuild, with the root token or an admin token:

bao write auth/kubernetes-think/config \
  kubernetes_host=https://10.10.1.20:6443 \
  kubernetes_ca_cert=@<new server CA>

Roles and policies survive. The Flux manifests need no change. Until this runs, snapshot jobs fail at login (backups pause, nothing breaks).

Rebuild dependency, 2026-11-07: OpenBao (host service, #8) has `auth/kubernetes-think` configured against today's think cluster (`kubernetes_host=https://10.10.1.20:6443`, CA `k3s-server-ca@1793554271`). It is used by the hourly snapshot CronJob in flux-clusters `clusters/think/openbao-snapshot`, and will be by ESO. After the rebuild, with the root token or an admin token: ```bash bao write auth/kubernetes-think/config \ kubernetes_host=https://10.10.1.20:6443 \ kubernetes_ca_cert=@<new server CA> ``` Roles and policies survive. The Flux manifests need no change. Until this runs, snapshot jobs fail at login (backups pause, nothing breaks).
Author
Owner

Naming: CAs come from pki-cluster-think (mc#9 rename), not pki-k3s-think. Delivered from OpenBao KV infra/k3s/think (#11).

Naming: CAs come from pki-cluster-think (mc#9 rename), not pki-k3s-think. Delivered from OpenBao KV infra/k3s/think (#11).
Author
Owner

Naming set by ADR-0005 (84bc2bf): the rebuilt think cluster is c1, site caosh. --cluster-domain c1.caosh.int.animeteamspeak.moe, --node-name .c1.caosh.int.animeteamspeak.moe, Cilium cluster-name c1. CA set: scripts/pki-cluster-ca.sh c1 -> KV infra/k3s/c1, constraints pki/clusters/c1.domains (one zone entry covers every future node).

Naming set by ADR-0005 (84bc2bf): the rebuilt think cluster is c1, site caosh. --cluster-domain c1.caosh.int.animeteamspeak.moe, --node-name <host>.c1.caosh.int.animeteamspeak.moe, Cilium cluster-name c1. CA set: scripts/pki-cluster-ca.sh c1 -> KV infra/k3s/c1, constraints pki/clusters/c1.domains (one zone entry covers every future node).
Author
Owner

Blocked by #22: bootstrap c1's Flux with flux-operator + FluxInstance (spec.cluster.domain) instead of the text-patched install.yaml.

Blocked by #22: bootstrap c1's Flux with flux-operator + FluxInstance (spec.cluster.domain) instead of the text-patched install.yaml.
Author
Owner

From #11 (2026-11-11): with cluster.zone set, the Kubernetes Node name is <host>.c1.caosh.int.animeteamspeak.moe, not the hostname. machine-configs now has one source for it (k3s.nodeName), used by --node-name and deploy-health/node-health (b85cd95).

Check these at the rebuild:

  • Taskfile tasks that run kubectl get node {{.HOST}} (e.g. around line 1404)
  • LINSTOR/Piraeus satellite names vs Node names
  • kured
  • lab/clusters manifests with nodeName or nodeSelector on kubernetes.io/hostname

Also: Flux's bundle hardcodes cluster.local (sed stopgap b939e24, proper fix #22).

From #11 (2026-11-11): with `cluster.zone` set, the Kubernetes Node name is `<host>.c1.caosh.int.animeteamspeak.moe`, not the hostname. machine-configs now has one source for it (`k3s.nodeName`), used by `--node-name` and deploy-health/node-health (b85cd95). Check these at the rebuild: - Taskfile tasks that run `kubectl get node {{.HOST}}` (e.g. around line 1404) - LINSTOR/Piraeus satellite names vs Node names - kured - lab/clusters manifests with `nodeName` or `nodeSelector` on `kubernetes.io/hostname` Also: Flux's bundle hardcodes `cluster.local` (sed stopgap b939e24, proper fix #22).
Author
Owner

Storage decisions for the rebuild (2026-11-11):

Toshiba split (set at creation, disko): part1 tank = everything except the last 500G (ZFS, LINSTOR as today); part2 ceph-osd = 500G raw for a Rook OSD. lib/disko/think-data.nix, zfs.dataDevice = <by-id>-part1, thinPoolQuota 1T -> 700G (same headroom ratio on the ~1.25T pool).

Installer wipe: disko's diskoScript only formats blank disks, so a reinstall over the live thinks would have kept the btrfs root (old k3s/etcd state) and the old whole-disk ZFS part1 (no room for part2, stale labels). New animeteamspeak.installer.wipeDisks / blankPartitions in hosts/<name>/installer.nix: wipe both disks before disko, blank the two raw partitions after. test-01 runs the wipe path in vm:e2e.

Rook on c1 (flux-clusters/clusters/c1/rook, from standby/rook):

  • OSDs on the thinks' part2, node names as c1 FQDNs.
  • mons on the Pis (kubernetes.io/arch=arm64), mgr x2 / MDS / RGW on the thinks.
  • Erasure coding everywhere data lives: RBD (ceph-rbd-ec: replicated rbd-meta + EC 2+1 rbd-ec dataPool), CephFS (ceph-fs-ec: replicated default pool + EC 2+1 ec pool), RGW (EC 2+1 data pool). Metadata pools 3x replicated. Failure domain host.
  • OSD memory limit 2Gi -> osd_memory_target ~1.6G (cgroup ratio 0.8).
  • Monitoring and serviceMonitors off (no prometheus-operator CRDs on c1). rgw-external and the COSI driver left out until c1 has an LB pool / Gateway / cert-manager.

Open: EC 2+1 on 3 hosts has min_size 3 by default, so EC I/O blocks while any think is down, kured reboots included. Options: accept it, or min_size: 2 on the EC pools (writes with no redundancy during the window).

Also: clusters/c1 is a copy of clusters/think with kubernetes.io/hostname / nodeName values rewritten to FQDNs (k3s --node-name sets the hostname label too).

Storage decisions for the rebuild (2026-11-11): **Toshiba split (set at creation, disko):** part1 `tank` = everything except the last 500G (ZFS, LINSTOR as today); part2 `ceph-osd` = 500G raw for a Rook OSD. `lib/disko/think-data.nix`, `zfs.dataDevice = <by-id>-part1`, `thinPoolQuota` 1T -> 700G (same headroom ratio on the ~1.25T pool). **Installer wipe:** disko's `diskoScript` only formats blank disks, so a reinstall over the live thinks would have kept the btrfs root (old k3s/etcd state) and the old whole-disk ZFS part1 (no room for part2, stale labels). New `animeteamspeak.installer.wipeDisks` / `blankPartitions` in `hosts/<name>/installer.nix`: wipe both disks before disko, blank the two raw partitions after. test-01 runs the wipe path in vm:e2e. **Rook on c1** (`flux-clusters/clusters/c1/rook`, from `standby/rook`): - OSDs on the thinks' part2, node names as c1 FQDNs. - mons on the Pis (`kubernetes.io/arch=arm64`), mgr x2 / MDS / RGW on the thinks. - **Erasure coding everywhere data lives:** RBD (`ceph-rbd-ec`: replicated `rbd-meta` + EC 2+1 `rbd-ec` dataPool), CephFS (`ceph-fs-ec`: replicated default pool + EC 2+1 `ec` pool), RGW (EC 2+1 data pool). Metadata pools 3x replicated. Failure domain host. - OSD memory limit 2Gi -> osd_memory_target ~1.6G (cgroup ratio 0.8). - Monitoring and serviceMonitors off (no prometheus-operator CRDs on c1). `rgw-external` and the COSI driver left out until c1 has an LB pool / Gateway / cert-manager. **Open:** EC 2+1 on 3 hosts has min_size 3 by default, so EC I/O blocks while any think is down, kured reboots included. Options: accept it, or `min_size: 2` on the EC pools (writes with no redundancy during the window). Also: `clusters/c1` is a copy of `clusters/think` with `kubernetes.io/hostname` / `nodeName` values rewritten to FQDNs (k3s `--node-name` sets the hostname label too).
Author
Owner

Decided 2026-11-11: full set of classes. ceph-rbd (3x), ceph-rbd-ec (EC 2+1, rbd-meta headers), ceph-fs (cephfs-replicated pool, plain manifest), ceph-fs-ec (cephfs-ec), ceph-bucket (RGW EC 2+1). EC pools keep min_size 3: I/O pauses while a think is down and resumes without loss; replicated classes (min_size 2) stay up through kured.

Decided 2026-11-11: full set of classes. ceph-rbd (3x), ceph-rbd-ec (EC 2+1, rbd-meta headers), ceph-fs (cephfs-replicated pool, plain manifest), ceph-fs-ec (cephfs-ec), ceph-bucket (RGW EC 2+1). EC pools keep min_size 3: I/O pauses while a think is down and resumes without loss; replicated classes (min_size 2) stay up through kured.
Author
Owner

c1 rebuilt 2026-11-12. OpenBao CAs + node FQDNs, flux-operator, Harbor mirror, reset gate + scripts/k3s-reset.sh. LINSTOR/DRBD verified (2r + enc volumes cross-node), kured rolled all Pis (#26 = Pi verify clock race). Rook: 3 encrypted OSDs (PVC deviceSet on local PVs, keys in OpenBao rook-c1), lz4 compression, RBD/CephFS replicated+EC, RGW EC, cephx rotated to gen 2, HEALTH_OK (insecure-key warnings muted until kernel 7.0 + cephcsi 3.17.1). Dual-stack not done: separate follow-up.

c1 rebuilt 2026-11-12. OpenBao CAs + node FQDNs, flux-operator, Harbor mirror, reset gate + scripts/k3s-reset.sh. LINSTOR/DRBD verified (2r + enc volumes cross-node), kured rolled all Pis (#26 = Pi verify clock race). Rook: 3 encrypted OSDs (PVC deviceSet on local PVs, keys in OpenBao rook-c1), lz4 compression, RBD/CephFS replicated+EC, RGW EC, cephx rotated to gen 2, HEALTH_OK (insecure-key warnings muted until kernel 7.0 + cephcsi 3.17.1). Dual-stack not done: separate follow-up.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lab/machine-configs#14
No description provided.