Skip to content

ops(runbook): script for fetching from the pod's data clone#76

Merged
themightychris merged 1 commit into
mainfrom
ops/pod-git-remote
May 20, 2026
Merged

ops(runbook): script for fetching from the pod's data clone#76
themightychris merged 1 commit into
mainfrom
ops/pod-git-remote

Conversation

@themightychris
Copy link
Copy Markdown
Member

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's git upload-pack /app/data inside 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-pack only serves fetch; pushing into the pod would bypass gitsheets and fight the push daemon.

Test plan

  • git fetch pod against the live sandbox returns pod/published and the pod-resident conflicts/2026-05-19T22-57-23Z branch
  • After pod restart, git fetch pod still works (label selector resolution survives)
  • Env overrides (CFP_POD_NAMESPACE=…) let you point at a different pod / cluster

🤖 Generated with Claude Code

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>
@themightychris themightychris merged commit 07cca31 into main May 20, 2026
1 check passed
@themightychris themightychris deleted the ops/pod-git-remote branch May 20, 2026 02:43
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