Skip to content

CRD Reference

Complete reference for Boilerhouse Kubernetes Custom Resource Definitions.

All resources use API group boilerhouse.dev and version v1alpha1. The authoritative schemas are generated from go/api/v1alpha1/*_types.go and live in config/crd/bases-go/.


BoilerhouseWorkload

Short name: bhw. Defines a container workload — image, resources, network, health checks, and idle policy.

yaml
apiVersion: boilerhouse.dev/v1alpha1
kind: BoilerhouseWorkload
metadata:
  name: my-agent
  namespace: boilerhouse
spec:
  version: "1.0.0"
  image:
    ref: my-registry/my-agent:latest
  resources:
    vcpus: 2
    memoryMb: 2048
    diskGb: 10
  network:
    access: restricted
    allowlist:
      - api.anthropic.com
    expose:
      - guest: 8080
    websocket: /ws
    credentials:
      - domain: api.anthropic.com
        headers:
          - name: x-api-key
            valueFrom:
              secretKeyRef:
                name: anthropic-api
                key: key
  filesystem:
    overlayDirs:
      - /workspace
    encryptOverlays: true
  idle:
    timeoutSeconds: 300
    action: hibernate
    watchDirs:
      - /workspace
  health:
    intervalSeconds: 5
    unhealthyThreshold: 10
    httpGet:
      path: /health
      port: 8080
  entrypoint:
    cmd: node
    args: ["server.js"]
    workdir: /app
    env:
      NODE_ENV: production

Spec Fields

FieldTypeRequiredDescription
versionstringyesWorkload version
image.refstringyes*OCI image reference
image.dockerfilestringyes*Dockerfile path relative to WORKLOADS_DIR (mutually exclusive with ref)
resources.vcpusintegeryesCPU cores
resources.memoryMbintegeryesMemory in megabytes
resources.diskGbintegeryesScratch disk in gigabytes
network.accessstringnonone, restricted, or unrestricted
network.allowliststring[]noAllowed domains (for restricted)
network.exposearraynoPort exposures
network.expose[].guestintegernoContainer port
network.websocketstringnoWebSocket path
network.credentialsarraynoPer-domain credential injection
network.credentials[].domainstringnoTarget domain
network.credentials[].headersarraynoHeaders to inject
network.credentials[].headers[].namestringyesHTTP header name
network.credentials[].headers[].valuestringnoLiteral header value
network.credentials[].headers[].valueFrom.secretKeyRef.namestringyesKubernetes Secret name
network.credentials[].headers[].valueFrom.secretKeyRef.keystringyesKey within the Secret
filesystem.overlayDirsstring[]noDirectories to persist across hibernation
filesystem.encryptOverlaysboolnoReserved (storage-class level encryption in practice)
idle.timeoutSecondsintegernoIdle timeout before hibernation/destroy
idle.actionstringnohibernate or destroy
idle.watchDirsstring[]noDirectories whose mtime changes reset the idle timer
health.intervalSecondsintegernoReadiness probe interval
health.unhealthyThresholdintegernoFailure count before unhealthy
health.httpGet.pathstringnoHTTP probe path
health.httpGet.portintegernoHTTP probe port
health.exec.commandstring[]noExec probe command
entrypoint.cmdstringnoOverride container command
entrypoint.argsstring[]noCommand arguments
entrypoint.workdirstringnoWorking directory
entrypoint.envmapnoEnvironment variables

* Exactly one of image.ref / image.dockerfile must be set.

Status

FieldTypeDescription
phasestringCreating, Ready, or Error
detailstringHuman-readable phase detail
observedGenerationintegerLast reconciled generation

BoilerhousePool

Short name: bhp. Maintains a set of pre-warmed Pods for a workload.

yaml
apiVersion: boilerhouse.dev/v1alpha1
kind: BoilerhousePool
metadata:
  name: my-agent-pool
  namespace: boilerhouse
spec:
  workloadRef: my-agent
  size: 5
  maxFillConcurrency: 3

Spec Fields

FieldTypeRequiredDescription
workloadRefstringyesName of the BoilerhouseWorkload to pool
sizeintegeryesNumber of warm instances to maintain (min 0)
maxFillConcurrencyintegernoMax parallel instance creations (min 1)

Status

FieldTypeDescription
readyintegerNumber of ready instances
warmingintegerNumber of instances starting up
phasestringHealthy, Degraded, or Error

BoilerhouseClaim

Short name: bhc. Represents a tenant's claim on an instance. Create a Claim to allocate a Pod; delete it to release.

yaml
apiVersion: boilerhouse.dev/v1alpha1
kind: BoilerhouseClaim
metadata:
  name: claim-alice-my-agent
  namespace: boilerhouse
  labels:
    boilerhouse.dev/tenant: alice
spec:
  tenantId: alice
  workloadRef: my-agent
  resume: true

Claim name convention: claim-<tenantId>-<workloadRef>.

Spec Fields

FieldTypeRequiredDescription
tenantIdstringyesTenant identifier
workloadRefstringyesName of the BoilerhouseWorkload
resumebooleannoRestore tenant's previous overlay data

Status

FieldTypeDescription
phasestringPending, Active, Releasing, Released, ReleaseFailed, or Error
instanceIdstringName of the Pod assigned to this claim
endpoint.hoststringPod IP or Service host
endpoint.portintegerService port
sourcestringHow the instance was provisioned: existing, cold, cold+data, pool, pool+data
claimedAtstringTimestamp the claim reached Active
detailstringHuman-readable phase detail

Lifecycle

  1. Create the Claim resource
  2. Operator sets phase to Pending, then allocates an instance
  3. Phase transitions to Active with endpoint details
  4. Delete the Claim resource to release (or rely on idle timeout)
  5. Operator extracts overlay, destroys the Pod, sets phase to Released

BoilerhouseTrigger

Short name: bht. Connects external events to tenant claims.

yaml
apiVersion: boilerhouse.dev/v1alpha1
kind: BoilerhouseTrigger
metadata:
  name: tg-my-agent
  namespace: boilerhouse
spec:
  type: telegram
  workloadRef: my-agent
  tenant:
    from: usernameOrId
    prefix: "tg-"
  driver: claude-code
  guards:
    - type: allowlist
      config:
        tenantIds: ["tg-alice", "tg-bob"]
  config:
    botTokenSecretRef:
      name: telegram-bot-token
      key: token
    updateTypes: ["message"]
    pollTimeoutSeconds: 30

Spec Fields

FieldTypeRequiredDescription
typestringyeswebhook, slack, telegram, or cron
workloadRefstringyesTarget workload name
tenant.staticstringyes*Static tenant ID
tenant.fromstringyes*Field to extract tenant ID from
tenant.prefixstringnoPrefix for extracted tenant ID
driverstringnoProtocol driver (claude-code, openclaw, or unset for plain HTTP)
driverOptionsmapnoDriver configuration (free-form)
guardsarraynoAuthorization guard chain
guards[].typestringnoGuard type (allowlist, api)
guards[].configmapnoGuard configuration (free-form)
configmapnoAdapter-specific configuration (see Trigger Schema)

* Exactly one of tenant.static / tenant.from must be set.

Status

FieldTypeDescription
phasestringActive or Error
detailstringHuman-readable phase detail

Labels

The operator labels managed resources with:

LabelValue
boilerhouse.dev/managedtrue
boilerhouse.dev/workloadWorkload name
boilerhouse.dev/tenantTenant ID (claimed Pods only)
boilerhouse.dev/poolPool name (pool Pods only)
boilerhouse.dev/pool-statuswarming or ready (pool Pods only)

Annotations

AnnotationWhereMeaning
boilerhouse.dev/last-activityBoilerhouseClaimTimestamp of the most recent API activity — used by the idle monitor