Architecture
DemandDetector watches pods and enqueues NodePool reconciliation. The NodePool controller aggregates unschedulable demand, calls CloudBroker with allowedProviders, and creates a NodeClaim when capacity is needed. The NodeClaim controller generates the bootstrap script, provisions the VM, and monitors join (20-minute timeout). Bootstrap on the VM: Tailscale → containerd → kubelet/kubeadm → kubeadm join over the Tailscale IP. Scale-down: cordon → drain → delete node → delete VM. NodeClaim phases: Pending → Provisioning → Joining → Ready → Deleting.
graph TB
POD["Pending Pod (unschedulable)"]
subgraph Controllers ["Cloudburst Controllers"]
DD["Demand Detector (watches pods)"]
NPC["NodePool Controller (scale-up / scale-down)"]
NCC["NodeClaim Controller (VM lifecycle)"]
end
CB["CloudBroker (brokers providers, cost recommendation)"]
subgraph Providers ["Cloud Providers (brokered)"]
GCP["GCP"]
SCW["Scaleway"]
HTZ["Hetzner"]
DO["DigitalOcean"]
OVH["OVH"]
AWS["AWS"]
AZ["Azure"]
end
BS["Bootstrap (cloud-init + kubeadm join over Tailscale)"]
NODE["New K8s Node (Ready)"]
POD -->|"detected"| DD
DD -->|"enqueue"| NPC
NPC -->|"POST /api/recommendations"| CB
CB -->|"cost recommendation"| NPC
NPC -->|"create NodeClaim"| NCC
NCC -->|"provision VM"| Providers
Providers --> BS
BS -->|"node joins cluster"| NODE
NODE -->|"pod scheduled"| POD
NPC -->|"scale-down: delete NodeClaim"| NCC
NCC -->|"cordon + drain + delete VM"| Providers