Principle:A5c ai Babysitter Workspace Provisioning
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Workspace_Management, Volume_Provisioning |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
A method for provisioning volume-backed git workspaces with PVC lifecycle management and ephemeral alternatives for agent dispatch.
Description
Workspace Provisioning is the principle of creating isolated, persistent workspaces for agent runs. Each workspace is a KradleWorkspace CRD backed by either:
- PVC (persistent): A PersistentVolumeClaim with configurable storage class, capacity (default 10Gi), and access modes (default ReadWriteOnce). Survives across runs and can be reused.
- emptyDir (ephemeral): Binds instantly, no CSI provisioning, reclaimed with the pod. Used for ephemeral workspaces that live only for the duration of a single run.
Workspace reuse is supported via findReusableWorkspace, which searches for an existing Ready PVC-backed workspace for the same org/repo/branch.
Usage
Use this principle when dispatching AI agents that need git workspace isolation with optional persistence across runs.
Theoretical Basis
The provisioning is a branch on persistence:
if ephemeral:
workspace = KradleWorkspace(ephemeral=true)
mount = emptyDir // no pvcManifest
else:
pvc = PVC(storageClass, capacity, accessModes)
workspace = KradleWorkspace(pvcName=pvc.name)
mount = pvc // mounted at /workspace in the Job
Key property: The storage class is NOT hardcoded — it defaults to the cluster's default StorageClass unless explicitly set, preventing binding failures on AKS/EKS/GKE where default class names differ.