Resource names
Names derive from a SHA-256 hash of the user ID, so they are stable and reveal nothing about the user:
All carry the labels
app.kubernetes.io/managed-by: r5d-chat,
app.kubernetes.io/name: r5d-chat-workspace, r5d.chat/workspace, and
r5d.chat/user-id.
Starting a workspace
1
A request needs the workspace
A chat run, file browse, upload, preview, or command triggers it.
2
Objects are reconciled
The PVC, identity Secret, and Service are created if missing, then the
Deployment is set to one replica. Concurrent requests for the same user
share one in-flight reconciliation.
3
Readiness is awaited
The control plane polls until the daemon’s readiness probe passes, up to 90
seconds, then returns a 503 with
workspace_start_timeout.4
Work proceeds
Requests are proxied to the daemon over the Service with the workspace’s
bearer token.
Activity and leases
Two mechanisms keep a busy workspace alive:- Activity timestamps update on every workspace operation.
- Active leases are held by long-running work. Starting a shell command increments the lease count; polling to completion or cancelling decrements it.
WORKSPACE_IDLE_SECONDS.
Because a running shell command holds a lease, a long build is never reaped
mid-task even if it exceeds the idle timeout.
Scaling to zero
Scale-down sets the Deployment to zero replicas. Everything else stays: the Service, identity Secret, database records, and the PVC with all files. The next request scales the same Deployment back to one and remounts the same home directory. Setworkspace.idleSeconds according to your tradeoff between cost and cold
starts. 1800 seconds is a reasonable default; interactive-heavy installations
often prefer 3600.
Inspecting workspaces
Storage
Home volumes areReadWriteOnce and mounted whole at /home/r5d. The chart
never uses subPath, which keeps it compatible with Kata.
workspace.storageSize applies when a PVC is created. Changing it affects only
new workspaces. To grow an existing volume, your storage class must allow
expansion:
Removing a user’s workspace
Deleting workspace data should be a deliberate, audited action:Troubleshooting
Workspace did not become ready in time
Workspace did not become ready in time
The pod failed to become ready within 90 seconds. Check pod events for image
pull failures, volume attach problems, or insufficient quota:
ImagePullBackOff on workspace pods only
ImagePullBackOff on workspace pods only
workspace.imagePullSecret is unset while the image is private. The control
plane’s own imagePullSecrets does not apply to workspace pods.Pod stays Pending
Pod stays Pending
Usually no node can satisfy the volume or the resource requests. Check that
the storage class exists and provisions
ReadWriteOnce volumes, and confirm
namespace quota headroom.Workspaces never scale down
Workspaces never scale down
Leases may be stuck above zero from processes that never completed, or the
control plane may be failing its reconcile loop. Check control-plane logs and
confirm
WORKSPACE_IDLE_SECONDS is what you expect.Agent commands are killed unexpectedly
Agent commands are killed unexpectedly
The container exceeded its memory limit. Raise
workspace.resources.limits.memory and confirm with:Files disappeared after a restart
Files disappeared after a restart
Files outside
/home/r5d are not persisted. Only the home directory is on
the volume; everything else resets when the pod restarts.