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:
committed by
GitHub
parent
a09d4ac340
commit
82ee0d0cdb
@@ -125,6 +125,15 @@ kubectl -n "$NS" patch sandboxwarmpool "$POOL" --type merge -p '{"spec":{"replic
|
||||
throwaway pod, patch the policy, then resume.
|
||||
- Agent files live at `/workspace`, the same PVC mounted with
|
||||
`subPath: workspace`; it survives suspend/resume and dies with the PVC.
|
||||
- The templates set `HOME=/workspace` (the image default is `/home/node`). 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 workspace; `~`
|
||||
and `$HOME`-relative tool caches/config also resolve there. `DSH_HOME` remains
|
||||
`/home/node/.dsh`, so state and credentials stay out of the workspace. Pod env
|
||||
is stamped at sandbox creation: a sandbox created before the override keeps
|
||||
the old `HOME` until it is recreated (or its `podTemplate` is patched and the
|
||||
sandbox resumed). Verify with
|
||||
`kubectl -n "$NS" exec "$POD" -- printenv HOME`.
|
||||
- DSH confines bash with its own file sandbox (`bubblewrap`, else Landlock) and
|
||||
fails closed with `SANDBOX_UNAVAILABLE` when neither works. The image ships
|
||||
`bubblewrap`, but it is unsetuid and needs an unprivileged user namespace that
|
||||
|
||||
@@ -19,6 +19,7 @@ events, then compare desired vs observed state. Keep output bounded. Never
|
||||
| `CrashLoopBackOff`, probe 401 | logs, `describe` | Probe path is `/`; use `/favicon.svg`. |
|
||||
| Restart with mode-660 error | logs mention `.credentials.yaml` | kubelet fsGroup widened the file; suspend, `chmod 600` from a throwaway pod, patch `fsGroupChangePolicy: OnRootMismatch`, resume. |
|
||||
| Every bash command fails with `SANDBOX_UNAVAILABLE` | DSH tool result names the requested mode and backends | DSH's own command sandbox has no usable runner: `bubblewrap` ships in the image but is unsetuid and needs an unprivileged user namespace this hardened pod does not grant, and no Landlock runner is available. The example template sets `DSH_PERMISSION_MODE=danger-full-access`; do not grant capabilities to restore it unless the operator explicitly accepts that downgrade. |
|
||||
| Folder picker opens on `/home/node`, not the workspace | `kubectl exec <pod> -- printenv HOME` | The sandbox predates the template's `HOME=/workspace` and pod env is stamped at creation. Recreate the sandbox (PVC survives) or patch its `podTemplate` with `HOME`, then resume. Workspace dotfiles (`.cache`, `.config`, `.npm`, `.agents`) are the expected trade-off of the override, not a fault. |
|
||||
| PVC `Pending` | `kubectl describe pvc`, StorageClass | No default provisioner, access mode, zone binding. |
|
||||
| Launch token not found | `kubectl logs <pod> --tail=2000 | grep 'dsh web:'` | Pod not ready yet, or logs rotated. Do not guess tokens; wait for readiness. |
|
||||
| Sandbox reports `Finished=True` | pod phase, `kubectl get events` | The backing Pod reached `Failed` (eviction, spot reclaim) and `failedPodPolicy` defaults to `Retain`. Delete the Pod to force a replacement, or set `Recreate` (v1.0.8+) on the Sandbox/template; the claim and PVCs survive either way. |
|
||||
|
||||
Reference in New Issue
Block a user