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
@@ -101,6 +101,25 @@ kubectl -n dsh-demo port-forward "pod/$SB" 18081:3080
|
||||
> example or a reachable Service instead; see
|
||||
> [optional hardening](../dsh-agents-as-a-service/docs/optional-hardening.md).
|
||||
|
||||
## Folder picker and the workspace
|
||||
|
||||
The template sets `HOME=/workspace`. DSH's directory picker (the folder explorer
|
||||
used to choose a workspace) has no start-path setting: it lists `$HOME` when it
|
||||
opens, so with the image default (`/home/node`) it would start on a directory that
|
||||
is not persisted. Pointing `HOME` at the PVC-backed workspace makes the picker
|
||||
open there (labelled *Home* in its breadcrumbs) and makes `~` in agent commands
|
||||
resolve to `/workspace`. The trade-off is that `$HOME`-relative tool caches and
|
||||
config (`.cache`, `.config`, `.local`, `.npm`, `.agents`) are written into the
|
||||
workspace on the PVC. DSH state is unaffected: `DSH_HOME` stays
|
||||
`/home/node/.dsh`. The rationale and the list of affected paths are in
|
||||
[`10-sandboxtemplate.yaml`](../dsh-agents-as-a-service/manifests/10-sandboxtemplate.yaml).
|
||||
|
||||
Verify inside a running sandbox:
|
||||
|
||||
```bash
|
||||
kubectl -n dsh-demo exec "$SB" -- printenv HOME # /workspace
|
||||
```
|
||||
|
||||
## Network policy and optional hardening
|
||||
|
||||
The template omits `networkPolicyManagement`, so the agent-sandbox controller
|
||||
|
||||
Reference in New Issue
Block a user