1
0
mirror of https://github.com/sredevopsorg/deepseek-kubernetes-sandbox.git synced 2026-11-03 01:13:24 +00:00

feat(example): start DSH's folder picker on the persisted workspace (#36)

The directory picker has no start-path setting: it lists $HOME whenever it
opens. With the image default HOME=/home/node the folder explorer started on
a throwaway directory, so point HOME at the PVC-backed /workspace in both
sandbox templates. `~` and $HOME-relative tool caches/config follow; DSH_HOME
stays /home/node/.dsh, so sessions, config and credentials are unaffected.

Document the trade-off in the image contract and both examples, add
troubleshooting for sandboxes whose pod env was stamped before the change,
and assert HOME/~ in the e2e walkthrough.

Co-authored-by: SREDevOpsAgents <agents@sredevops.org>
This commit is contained in:
SREDevOps.org Agent
2026-10-30 11:19:03 -03:00
committed by GitHub
parent a09d4ac340
commit 82ee0d0cdb
9 changed files with 112 additions and 1 deletions

View File

@@ -72,6 +72,15 @@ pass "claim Ready in ${ELAPSED}s, adopted $SB"
echo "=== 3. write state on the PVC"
POD="$SB"
# HOME must point at the PVC-backed workspace: DSH's directory picker lists
# $HOME when it opens and has no start-path setting, so this is what makes the
# folder explorer start on the persisted tree instead of the ephemeral image
# home. It also makes ~ resolve to /workspace inside agent commands.
HOME_VALUE=$(kubectl -n "$NS" exec "$POD" -- printenv HOME)
[ "$HOME_VALUE" = "/workspace" ] || fail "HOME is '$HOME_VALUE', expected /workspace"
TILDE=$(kubectl -n "$NS" exec "$POD" -- sh -c 'cd ~ && pwd')
[ "$TILDE" = "/workspace" ] || fail "~ resolves to '$TILDE', expected /workspace"
pass "HOME=$HOME_VALUE and ~ resolve to the workspace"
kubectl -n "$NS" exec "$POD" -- sh -c 'echo "remember me" > /home/node/.dsh/marker.txt'
pass "state marker written in $POD"
# The agent workspace must be the dsh-home PVC's workspace/ subPath, writable