Skip to content

State Machines

Every Boilerhouse CRD has a status.phase field that follows a finite state machine. The operator writes phases; clients read them. CRD validation enforces the phase enums at the API server.

BoilerhouseWorkload

Workloads are container blueprints.

Creating ──► Ready
         ──► Error ──► Creating (on retry)

Ready ──► Creating (on spec change)
      ──► Error
FromToTrigger
CreatingReadyImage is available and spec validates
CreatingErrorBuild or validation failure
ReadyCreatingSpec change (new observedGeneration)
ErrorCreatingRetry after operator restart or spec fix

BoilerhousePool

Pools maintain warm Pods for a workload.

Healthy ──► Degraded ──► Healthy
        ──► Error
FromToTrigger
HealthyDegradedready < size (e.g., a warm Pod failed and is being replaced)
DegradedHealthyready >= size
Healthy / DegradedErrorReferenced workload missing, or persistent image-pull failure

The status.ready and status.warming counters track the underlying Pods so you don't have to infer them from the phase.

BoilerhouseClaim

Claims bind tenants to Pods. Most of the system's liveness concerns are in this state machine.

Pending ──► Active ──► Releasing ──► Released
                                 ──► ReleaseFailed
        ──► Error
FromToTrigger
PendingActivePod assigned and healthy; endpoint written
PendingErrorWorkload missing, capacity exhausted, or reconcile failure
ActiveReleasingClaim deleted, or idle timeout fired
ReleasingReleasedOverlay extracted, Pod destroyed
ReleasingReleaseFailedOverlay extraction failed — Pod may still exist and need manual cleanup

The source field on status records how the instance was acquired (existing, cold, cold+data, pool, pool+data) and is written once when transitioning to Active.

Idle-Triggered Release

Idle release follows the same Active → Releasing → Released path. The operator sets status.detail to indicate the release was idle-triggered rather than user-initiated.

Revival After Hibernation

To reclaim a hibernated tenant, delete the old Released Claim (the API does this for you) and create a new Claim with the same tenantId and workloadRef. The operator detects the saved overlay and sets source to pool+data or cold+data.

BoilerhouseTrigger

Triggers are long-lived configuration.

Active ──► Error ──► Active
FromToTrigger
ActiveErrorAdapter failed to start (missing secret, invalid config)
ErrorActiveConfig fixed, adapter restarted by the trigger gateway

Pod Phase (Instance)

Boilerhouse does not invent a new phase for instances — Pods use the standard Kubernetes Pod.status.phase:

Pending ──► Running ──► Succeeded / Failed

The operator enriches Pods with labels (boilerhouse.dev/*) so you can correlate them back to Workloads, Pools, Claims, and Tenants.