@@ -41,7 +41,7 @@ graph TB
4141 subgraph storage["Persistent Storage (HostPath)"]
4242 qdrant_vol["Qdrant Data<br/>/tmp/context-engine-qdrant"]
4343 models_vol["LLM Models<br/>/tmp/context-engine-models"]
44- repos_vol["Repositories <br/>/tmp/context-engine-repos "]
44+ work_vol["Workspace <br/>/tmp/context-engine-work "]
4545 end
4646 end
4747
@@ -55,7 +55,7 @@ graph TB
5555
5656 qdrant --> qdrant_vol
5757 llama --> models_vol
58- watcher --> repos_vol
58+ watcher --> work_vol
5959
6060 style nginx fill:#e1f5ff
6161 style qdrant fill:#fff4e1
@@ -197,15 +197,22 @@ WATCH_DEBOUNCE_SECS: "1.5"
197197
198198# ## Persistent Volumes
199199
200- Two persistent volumes are required :
200+ The deployment uses HostPath volumes for simplicity (suitable for single-node clusters like minikube) :
201201
2022021. **qdrant-storage** : Stores Qdrant vector database
203- - Size : 50Gi (adjust based on codebase size)
204- - Access : ReadWriteOnce
203+ - Path : ` /tmp/context-engine-qdrant `
204+ - Type : DirectoryOrCreate
205205
206- 2. **repos-storage** : Stores repository code
207- - Size : 100Gi (adjust based on number/size of repos)
208- - Access : ReadWriteMany (required for multiple watchers)
206+ 2. **models-storage** : Stores LLM models for llama.cpp
207+ - Path : ` /tmp/context-engine-models`
208+ - Type : DirectoryOrCreate
209+
210+ 3. **work-storage** : Stores workspace/repository code
211+ - Path : ` /tmp/context-engine-work`
212+ - Type : DirectoryOrCreate
213+ - Mounted at : ` /work` in containers
214+
215+ For multi-node production clusters, replace HostPath with PersistentVolumeClaims (PVCs) backed by network storage (NFS, Ceph, cloud provider volumes).
209216
210217# ## Resource Requests/Limits
211218
@@ -240,60 +247,58 @@ resources:
240247 cpu: "1"
241248` ` `
242249
243- # # Multi-Repository Setup
250+ # # Workspace Setup
244251
245- # ## Adding a New Repository
252+ # ## Indexing Your Codebase
246253
247- 1. **Upload repository code** to the repos volume :
248- ` ` ` bash
249- # Using uploader service
250- python scripts/upload_repo.py --repo-name my-service --path /local/path/to/repo
251-
252- # Or using kubectl cp
253- kubectl cp /local/path/to/repo context-engine/uploader-pod:/repos/my-service
254- ` ` `
254+ The deployment indexes the codebase mounted at `/work` inside containers, which maps to `/tmp/context-engine-work` on the host.
255255
256- 2 . **Create watcher deployment** for the new repo :
256+ 1 . **Copy your codebase to the workspace volume** :
257257 ` ` ` bash
258- # Copy and modify watcher template
259- cp watcher-backend-deployment.yaml watcher-my-service-deployment.yaml
260-
261- # Edit: change WATCH_ROOT, REPO_NAME, and volume subPath
262- # Then apply
263- kubectl apply -f watcher-my-service-deployment.yaml -n context-engine
258+ # For minikube (single-node)
259+ minikube ssh
260+ sudo mkdir -p /tmp/context-engine-work
261+ exit
262+
263+ # Copy your code
264+ kubectl cp /local/path/to/your/repo context-engine/watcher-<pod-id>:/work
265+
266+ # Or mount directly on the host
267+ cp -r /local/path/to/your/repo /tmp/context-engine-work/
264268 ` ` `
265269
266- 3 . **Verify indexing** :
270+ 2 . **Verify indexing** :
267271 ` ` ` bash
268272 # Check watcher logs
269- kubectl logs -f deployment/watcher-my-service -n context-engine
270-
273+ kubectl logs -f deployment/watcher -n context-engine
274+
275+ # Check indexer job completion
276+ kubectl get jobs -n context-engine
277+
271278 # Check collection status via MCP
272- curl http://indexer-mcp-service:8001/sse
279+ kubectl port-forward -n context-engine svc/mcp-indexer 8001:8001
280+ curl -X POST http://localhost:8001/mcp \
281+ -H "Content-Type: application/json" \
282+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"qdrant_status","arguments":{}}}'
273283 ` ` `
274284
275- # ## Repository Volume Structure
285+ # ## Workspace Volume Structure
276286
277287```
278- /repos/
279- ├── backend/
280- │ ├── .codebase/
281- │ │ └── state.json
282- │ ├── src/
283- │ ├── tests/
284- │ └── ...
285- ├── frontend/
286- │ ├── .codebase/
287- │ │ └── state.json
288- │ ├── src/
289- │ └── ...
290- └── ml-service/
291- ├── .codebase/
292- │ └── state.json
293- ├── models/
294- └── ...
288+ /work/ # Container mount point
289+ ├── .codebase/ # Indexing metadata
290+ │ └── state.json
291+ ├── src/ # Your source code
292+ ├── tests/
293+ ├── docs/
294+ └── ...
295295```
296296
297+ **Note**: The current deployment uses a single workspace at `/work`. For multi-repository setups, you can:
298+ - Use subdirectories under `/work` (e.g., `/work/backend`, `/work/frontend`)
299+ - Deploy multiple watcher instances with different `WATCH_ROOT` environment variables
300+ - Use a unified collection or separate collections per repository
301+
297302## Accessing Services
298303
299304### From Within Cluster
@@ -377,10 +382,10 @@ kubectl exec -n context-engine deployment/mcp-indexer -- curl -f http://localhos
377382# View logs for specific service
378383kubectl logs -f -n context-engine deployment/mcp-memory
379384kubectl logs -f -n context-engine deployment/mcp-indexer
380- kubectl logs -f -n context-engine deployment/watcher-backend
385+ kubectl logs -f -n context-engine deployment/watcher
381386
382- # View logs for all watchers
383- kubectl logs -f -n context-engine -l app =watcher
387+ # View logs for all watchers (if multiple)
388+ kubectl logs -f -n context-engine -l component =watcher
384389` ` `
385390
386391# ## Collection Status
@@ -448,13 +453,13 @@ kubectl describe pvc -n context-engine <pvc-name>
448453
449454` ` ` bash
450455# Check watcher logs
451- kubectl logs -f -n context-engine deployment/watcher-backend
456+ kubectl logs -f -n context-engine deployment/watcher
452457
453458# Verify volume mount
454- kubectl exec -n context-engine deployment/watcher-backend -- ls -la /repos/backend
459+ kubectl exec -n context-engine deployment/watcher -- ls -la /work
455460
456461# Check Qdrant connectivity
457- kubectl exec -n context-engine deployment/watcher-backend -- \
462+ kubectl exec -n context-engine deployment/watcher -- \
458463 curl -f http://qdrant:6333/readyz
459464` ` `
460465
0 commit comments