Skip to content

docs: sites — control plane, ingress, and bringing a workload up elsewhere - #105

Draft
wmantly wants to merge 1 commit into
mainfrom
docs/sites
Draft

wmantly wants to merge 1 commit into
mainfrom
docs/sites

Conversation

@wmantly

@wmantly wmantly commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Draft — for review, not for merge. Design only: this PR adds one document and changes no code.

Context: we set out to move one fleet off one provider and ended up deciding how a site works, because the answer to "can we move to OVH" turned out to depend on it. The decisions here were made against the actual code — docs/daemon.md for what already exists (several hosts, the WireGuard mesh, per-host DNS, moving an instance, backups/restore drills), and the manifests for what does not.

What the document adds over daemon.md:

  • a site as a failure boundary, provider-agnostic by requirement; host.site as a label so hosts: stays flat
  • ingress as a host capability (self | via | none) resolved against the existing routing: / forwards: vocabulary, replacing a hard-coded edge host — with the honest note that declared routing (Routes served by a hand-maintained Caddyfile: let a service say its route is external #8) is the enabling gap, since no manifest uses routing: today
  • the control plane (daemon, git, caddy, deploy runner, DNS, secrets) hot-hot at three sites; durable state is git + secrets, while jobs/plans/audit are history
  • third-party DNS with two scoped credentials (ACME TXT vs record writes), which also removes the cert-before-traffic problem at cutover
  • RPO declared per service and reported, with the backup destination pinned per daemon — a standby that restores from the primary's provider is not a standby
  • bring-up in three modes (standby | migrate | promote) built on migrate / export-spec / adopt / finalize rather than new machinery

Two findings recorded, both checked in the code:

  • pkg/gitsource keeps no config cache — a site needs a reachable mirror to deploy, and mirror lag is a deploy gate
  • the deployer has no MigratedTo guard for services; only instances have one (instance_spec.go)

Open (section 11): host.site tag vs nesting; whether control-plane workloads need a live copy per site; scheduling declared routing; standby sizing.

Nothing here is implemented. Read it, disagree in comments, and I will revise before anything is built.

…where

A design draft, not an implementation. It records the decisions made while
planning a provider move, and states only the mechanisms that do not exist:

- a site as a failure boundary, provider-agnostic by requirement; host.site
  as a label, so hosts: stays flat
- ingress as a host capability (self | via | none) against the existing
  routing:/forwards: vocabulary, instead of a hard-coded edge host; the
  enabling gap is declared routing (#8) — no manifest uses routing: today
- the control plane (daemon, git, caddy, deploy runner, DNS, secrets) hot-hot
  at three sites; durable state is git and secrets, jobs/plans are history
- third-party DNS with two scoped credentials (ACME TXT vs record writes),
  which also removes the cert-before-traffic problem
- RPO declared per service and *reported*, with the backup destination pinned
  per daemon — a standby that restores from the primary's provider is not one
- bring-up(spec, data, secrets, host) in three modes — standby, migrate,
  promote — built on migrate/export-spec/adopt/finalize rather than new code

Also records two findings: gitsource keeps no config cache (so a site needs a
reachable mirror to deploy), and the deployer has no MigratedTo guard for
services (only instances have it).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant