Anatomy of a Deploy (end-to-end)¶
The single thread that ties every component together:
- Sign up & set up — User logs in via GitHub or Google SSO, creates a workspace, then a project with a default region — each service is placed per environment, defaulting there (FR-077) — installs the Starform GitHub App, and connects a repo. (§13, §15, §20.1)
- Push — A push to a configured branch fires a GitHub webhook to the Starbase API, which verifies the signature, deduplicates, debounces rapid pushes, and enqueues a build job. (§16.11)
- Build — Starbase Worker clones the source; Railpack detects the framework (or a Dockerfile is used as fallback) and the build runs on Depot (one isolated Depot project per workspace); the image is pushed to the placement region's DO Container Registry; build logs relay live to the dashboard and archive to DO Spaces. (§16)
- Desired state — Worker records the new image and updates the project's desired state. (§32)
- Apply — Shuttle, running in the project's cluster, pulls desired state every 30s, diffs it against the live cluster, and applies the per-project resource set (namespace, isolation policies, Var Group Secrets, Deployment, Service, HTTPRoute, etc.) as a zero-downtime rolling update. (§19, §20)
- Serve traffic — Cloudflare → DO Load Balancer → Envoy Gateway (routes by hostname via HTTPRoute) → the customer pod. (§5, §33, §34)
- Observe — one OTel Collector per cluster ships app logs, Envoy access logs, and cAdvisor metrics to the regional OTel gateway → ClickHouse (per-plan TTL retention); Stardeck shows logs and the seven customer metrics — SQL over the rows, scoped per-tenant by a server-side query filter. (§35 v2)
- Bill — Shuttle snapshots running pods every 60s to Starbase (Postgres raw snapshots + running totals; the ClickHouse audit trail is post-MVP); a monthly cron applies the plan credit and generates a Stripe invoice. (§36)
Core principle
Starbase decides, Shuttle applies. Everything flows through desired state — there is no direct Kubernetes mutation outside the desired-state loop.
How the §-cross-references work (the load-bearing bit)
This site is reorganized by component, so the PRD's old linear §-numbers no longer map to
a single document. Referential integrity is preserved three ways:
- Stable anchors. Every section keeps a
§-encoded anchor, independent of its page or title — e.g. the tenant key lives at§24.1and the desired-state contract at§32. Those links are live right now. - One directory. Canonical Sources records the one page
each
§lives on. If a section is ever re-homed, only that table changes — the anchor doesn't. - Strict build.
mkdocs build --strictturns any broken§-link into a build failure, so drift can't sneak in.
Plain-text §-citations above (e.g. §16, §32) become live links as their pages land in Phase 2.