Add Kubernetes static-host publishing backend - #4
Merged
Conversation
Incorporate the companion review: explicit Security model section (trusted token holders, SSO as sole viewer gate, content trusted-by-construction), atomic exclusive-create storage with collision retry and crash-safe renames, update returns 404 (no create), timingSafeEqual, /readyz vs /healthz, index-page metadata escaping, NetworkPolicy + internal-only API ingress, single-writer RWO constraint, and documented scale ceiling. Rejected the CSP/content-sanitization finding on /p/:id as contrary to the fidelity goal; deferred index-DB/pagination/metrics as non-goals.
… restrictable+safe-default view exposure, graceful shutdown)
Owner
Author
|
Updated with two fix rounds addressing the final whole-branch review and a companion architectural review:
Verification: 89/89 tests, |
- Steer first-timers to the appsscript backend (no cloud account/billing/admin) and label gcp/kubernetes as advanced. - Rewrite the Claude Code install block to default to Apps Script with no backend-choice friction, one-step-at-a-time plain-language guidance, and gcp only as an explicit opt-in escape hatch.
Owner
Author
|
Added an onboarding-clarity commit: the guided Claude Code install block now defaults to the Apps Script backend (no Google Cloud account needed) with no backend-choice friction for first-timers, and the Backends section steers newcomers to |
grinco
added a commit
that referenced
this pull request
Jul 4, 2026
Add Kubernetes static-host publishing backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #3 (base =
feat/configurable-backend) so this diff shows only the Kubernetes work. Merge after #3.What
Adds a third publishing backend, selected with
PAGEDROP_BACKEND=kubernetes: a self-hosted PageDrop host service on Kubernetes with viewing behind the operator's SSO proxy. Best HTML/CSS/JS fidelity (raw serving, no iframe sandbox) and clean internal URLs; no native Docs/Slides copies or Drive search. Built to the spec/plan indocs/lld/2026-07-04-pagedrop-kubernetes-backend-{design,plan}.md.Topology — dumb server + smart adapter (mirrors the Apps Script split):
src/host/, zero new deps —node:http/node:fs): two ports, atomic + exclusive-create storage on a PVC, path-traversal-guarded ids,crypto.timingSafeEqualbearer auth (fail-closed), HTML-escaped index page,updatereturns 404 (never creates),/healthz+/readyz.src/adapters/k8s/):KubernetesPublisher implements Publisher(wraps HTML viasrc/core, composes/p/<id>view URLs),HostClienttransport, config loader; wired intocreatePublisher().Dockerfile(non-root,tsx) and a Helm chart (deploy/helm/pagedrop-host/) — Deploymentreplicas:1/Recreateover an RWO PVC, probes, Secret, two ingresses (SSO-fronted viewing + internal-only API), and a deny-by-default NetworkPolicy for the write API.Reviews
Design was hardened via companion architectural review before implementation (Security model, atomic storage, deny-by-default network posture, escaping). Executed test-first, task-by-task, with per-unit verification and a final independent whole-branch review; its one Important finding (NetworkPolicy rendering allow-all with empty sources) and an actionable Minor (readiness probe checked nothing) are fixed and verified (
5193f0b). A companion review of the full branch diff is also in flight.Verification
npx tsc --noEmitclean;npm test→ 88/88.docker build+ container/healthzsmoke → OK.helm lintclean;helm templateconfirms deny-by-default (no 8081 allow-rule with empty sources; rule appears when a source is set) and readiness on the disk-checking api/readyz.appsscript(default) andgcpbackends are unchanged.🤖 Generated with Claude Code