HOMELAB-1669: fix(agent-sandbox-mcp): pin sandbox-mcp image digest + align pod label with contract §5 #524
No reviewers
Labels
No labels
operator-review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Homelab/infra-core!524
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "epic/LD1"
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?
What
Replaces the placeholder tag in
core/manifests/agent-sandbox-mcp/deployment.yamlwith the digest-pinned reference published by thelivebuild of PR #523 (agent-sandbox-mcpis the last piece of the LD1.1 MCP spike; nothing syncs this module yet, so the change is inert in a cluster — the ArgoCD Application that reads it is the second PR of this ticket, inprod).The pin is
harbor.aaron.reynoza.org/lab-director/sandbox-mcp:v1.0.4@sha256:1ebd59688fd6da8f6a5dd4e04c38c8e1160fc21f959f55becf7f2d74547842c4. Both halves are deliberate: thev1.0.4alias tag keeps the reference readable andcrane/dockercommands re-derivable, while the digest is the half Kubernetes resolves —.forgejo/workflows/mcp-server-image-build.yamlrepublishes thev1.0.4andlatestaliases on every laterlivebuild, so the bare tag would move under a synced Deployment.Re-derived rather than copied from the ticket, and confirmed to be this image (
crane config: entrypointuvicorn k8s_agent_sandbox_mcp_server.app:app --host 0.0.0.0 --port 8000,USER 65532:65532,org.opencontainers.image.version=v1.0.4, sourceHomelab/infra-core):Comment/doc corrections
The pin makes four existing statements false, so they are corrected in the same PR rather than left as contradicted claims: the
deployment.yamlpin comment, thekustomization.yamlheader line ("which is why deployment.yaml carries a placeholder tag rather than a digest"), and the README's Pin table, "Deployment order" step 5 and "Digest pin" entry under "Left out on purpose" — all of which described the pin as the prod wiring ticket's job. The README's Pin section now carries thecrane digestre-derivation command, and "Verify" gained a digest-pin assertion.Verify
No new yamllint warnings: the single remaining
line-lengthwarning is pre-existing (the SDK-finding comment), and the long image line is a single unbreakable token, whichyamllint'sallow-non-breakable-wordspermits.Class B by the landing taxonomy: a module that nothing synchronises, so no cluster state can change from this PR. Digest-pinning review target: confirm the digest above against Harbor and that the tag+digest form is the intended convention for this image.
Second commit in this PR: pod label alignment (contract §5) — scope note
Found while wiring the ArgoCD side, and it is the difference between "wired" and "working", so it is fixed here rather than left as a trap
for the LD1.2 live smoke. Say the word if you want it split out: it is one self-contained commit (
f3228e5) and cherry-picks cleanly.The seat's NetworkPolicy admits exactly one ingress caller — pods labelled
app.kubernetes.io/name: agent-sandbox-mcpinagent-sandbox-system(contract §5 ingress: "everything else denied") — andprod/manifests/agent-sandbox/seat-template.yamlenforcesexactly that selector (
networkPolicyManagement: Managed+ the custom policy). The MCP Deployment's pod template carried onlyapp: agent-sandbox-mcp, so the rendered pod labels were{app: agent-sandbox-mcp}.Effect had it shipped: the server reaches the apiserver fine, so
create_sandbox,delete_sandboxandget_sandbox_statuswork — butevery call that talks to a seat's runtime sidecar at
<podIP>:8888(execute_command,upload_file,download_file,list_files,file_exists) is denied and times out. That is exactly the end-to-end exec this ticket exists to prove, and it would have read as anMCP/SDK bug rather than a label typo.
Fixed in this module, not in the seat template:
app.kubernetes.io/nameis the ratified contract value and the convention the rest ofinfra-core/prodfollows, and the alternative would edit a ratified contract to match a module.app: agent-sandbox-mcpstays — theService selects on it and the Deployment's selector is immutable, so this applies in place with no recreate (additive for both).
Verify: still 5 objects; pod labels carry both; Service and Deployment selectors unchanged; README "Verify" now asserts the pod label so
this cannot regress silently.
The seat's NetworkPolicy admits exactly one ingress caller — pods labelled `app.kubernetes.io/name: agent-sandbox-mcp` in `agent-sandbox-system` — but the MCP Deployment's pod template carried only `app: agent-sandbox-mcp`. Evidence (all three read, not assumed): * contract §5, "ingress": `from namespaceSelector agent-sandbox-system + podSelector app.kubernetes.io/name: agent-sandbox-mcp, port 8888/TCP only`, with "everything else denied". * prod `manifests/agent-sandbox/seat-template.yaml` enforces exactly that (`networkPolicyManagement: Managed` plus the custom `spec.networkPolicy`), so the selector is live, not documentation. * this module rendered `pod labels = {app: agent-sandbox-mcp}` only. Consequence if left as-is: the server still reaches the apiserver, so `create_sandbox` / `delete_sandbox` / `get_sandbox_status` work, but every call that talks to a seat's runtime sidecar at `<podIP>:8888` — `execute_command`, `upload_file`, `download_file`, `list_files`, `file_exists` — is denied and times out. That is precisely the end-to-end exec HOMELAB-1669 exists to prove, so the failure would have looked like an MCP/SDK bug in LD1.2 rather than a label typo. Fix in this module rather than in the seat template: `app.kubernetes.io/name` is the ratified contract value, it is the convention every other module in this repo follows, and the alternative (loosening the prod selector to `app`) would edit a ratified contract to match a module. `app: agent-sandbox-mcp` is kept: the Service selects on it and the Deployment's selector is immutable, so the change applies in place with no recreate. Adding the label is additive for both. Verify: - kubectl kustomize core/manifests/agent-sandbox-mcp -> still 5 objects - pod labels now carry both; Service selector and Deployment selector unchanged - README "Verify" gained the assertion that keeps this from regressingHOMELAB-1669: fix(agent-sandbox-mcp): pin sandbox-mcp image digestto HOMELAB-1669: fix(agent-sandbox-mcp): pin sandbox-mcp image digest + align pod label with contract §5