mirror of
https://github.com/sredevopsorg/deepseek-kubernetes-sandbox.git
synced 2026-11-03 01:13:24 +00:00
Fix idle sweeper suspending claims the gateway does not own (#4)
The sweeper listed every SandboxClaim in NAMESPACE and treated each dsh-<user> name as one of its own users. A claim applied by hand from the resource-layer manifests (e.g. 30-claim-alice.yaml) therefore looked exactly like a gateway user: the idle clock started on first sighting and the pod was suspended after IDLE_TIMEOUT. That deletes the pod the README's step 3 logs/port-forward targets, so the walkthrough broke as soon as the gateway was deployed next to it. Mark claims created by create_claim() with aaas.example.com/managed-by=dsh-gateway and skip everything else in sweep_once() before any idle bookkeeping happens. Document the ownership boundary in the example docs, the manifest and ADR-5, add unit coverage for the marker and the skipped sweep, and assert in run-test-kind.sh that alice's hand-applied claim stays Running while bob is correctly idle-suspended. Co-authored-by: SREDevOpsAgents <agents@sredevops.org>
This commit is contained in:
committed by
GitHub
parent
6301c21bea
commit
29eefd6ae5
@@ -101,7 +101,10 @@ spec:
|
||||
value: dsh-pool
|
||||
# Seconds a sandbox may sit idle before the sweeper suspends it
|
||||
# (pod deleted, PVC kept), and the max time a proxy request waits
|
||||
# for a suspended sandbox to become Ready again.
|
||||
# for a suspended sandbox to become Ready again. Only claims this
|
||||
# gateway created are swept: a claim applied by hand from the
|
||||
# resource-layer manifests carries no aaas.example.com/managed-by
|
||||
# annotation and is never suspended.
|
||||
- name: IDLE_TIMEOUT
|
||||
value: "60"
|
||||
- name: WAKE_TIMEOUT
|
||||
|
||||
Reference in New Issue
Block a user