Move Rails into k8s pod, CLI becomes kubectl patch #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone -- discovered during networking debugging session. The current nginx-bridge architecture has durability, security, and complexity issues that are eliminated by running Rails inside the cluster.
Repo
ldraney/mdviewUser Story
As a developer using mdview
I want the rendering server to run in k8s instead of on archbox directly
So that the Funnel stays up reliably, LAN exposure is eliminated, and the nginx bridge is unnecessary
Context
mdview currently runs puma on archbox and uses an nginx pod in k8s as a bridge to forward Tailscale traffic to it. This requires puma to bind
0.0.0.0(exposing port 3137 on LAN), a hardcoded Tailscale IP in the deployment, and a terminal session to keep puma alive. The westside-ror overlay already solves this with a pod-based architecture using hostPath mounts. mdview should adopt the same pattern.Full design doc:
docs/networking/kubectl-cli-architecture.mdFile Targets
Files the agent should modify or create:
bin/mdview-- rewrite to kubectl patch instead of rails serverpal-e-deployments/overlays/mdview/deployment.yaml-- Rails pod with hostPath volume, replace nginxpal-e-deployments/overlays/mdview/service.yaml-- port 3000 targeting Rails directlyFiles the agent should remove:
pal-e-deployments/overlays/mdview/configmap.yaml-- nginx config no longer neededFiles the agent should NOT touch:
app/-- Rails application code stays the samepal-e-deployments/overlays/mdview/ingress.yaml-- Tailscale Ingress config unchangedAcceptance Criteria
mdview path/to/file.md, the k8s deployment updates and the file is viewable athttps://mdview.tail5b443a.ts.netmdviewwith a different file, the pod restarts and serves the new file192.168.x.x:3137from a LAN device is no longer reachableTest Expectations
mdview docs/networking/analogy.md, verify Funnel URL renders itmdview README.md, verify Funnel URL switches to READMEcurl -s -o /dev/null -w "%{http_code}" https://mdview.tail5b443a.ts.netConstraints
Checklist
Related
ldraney/pal-e-deployments-- overlay changes live here