ops(runbook): script for fetching from the pod's data clone#76
Merged
Conversation
When investigating divergence between the sandbox and what's pushed to origin (or just chasing what the push daemon has in flight), it's useful to add the pod's PVC-backed clone as a git remote without exposing a network port. Git's ext:: transport lets you spawn an arbitrary command and speak git protocol over its stdio — here we shell into the pod and run git-upload-pack on /app/data. scripts/git-pod-uploadpack.sh resolves the pod by label selector each invocation (survives restarts) and reads kubeconfig / namespace / selector / data path from env with sensible defaults so a single line in the data repo's .git/config picks up the right pod for whoever has the kubeconfig. Runbook entry covers setup, env-var overrides, and the "read-only by design" carve-out — pushing to the pod would fight gitsheets and the push daemon. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c8fd3e7 to
0646237
Compare
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.
Summary
A tiny helper + runbook section for adding the sandbox pod's PVC-backed data clone as a git remote in your local data repo. Useful when chasing divergence between what the pod has on disk and what's pushed to GitHub — e.g. push-daemon backlog, escape-hatched
conflicts/*branches, or just diagnosing pod state when something's wedged.scripts/git-pod-uploadpack.sh— resolves the pod by label selector each call (survives restarts), exec'sgit upload-pack /app/datainside it. All knobs (kubeconfig, namespace, selector, data path) overridable via env with sandbox-friendly defaults.docs/operations/runbook.md— new section between "Hot-reload webhook" and "Helpful commands" with the one-time setup (git config protocol.ext.allow always,git remote add pod 'ext::sh …') and the env table.Read-only by design —
git upload-packonly serves fetch; pushing into the pod would bypass gitsheets and fight the push daemon.Test plan
git fetch podagainst the live sandbox returnspod/publishedand the pod-residentconflicts/2026-05-19T22-57-23Zbranchgit fetch podstill works (label selector resolution survives)CFP_POD_NAMESPACE=…) let you point at a different pod / cluster🤖 Generated with Claude Code