Auto-scaler
The auto-scaler dynamically provisions agents in response to workload. It is configured via a scalers.yaml file (or files in a scalers.d/ directory) that maps job labels to backend provisioning details. The orchestrator reloads it on SIGHUP.
Quick start
Section titled “Quick start”- Create a scaler config file:
version: 1globalMaxAgents: 10
scalers: - name: container-default type: container # runtime defaults to 'auto' -- detects Docker or Podman maxAgents: 10 labelSets: - labels: ['linux', 'container'] image: 'ghcr.io/myorg/kici-agent:latest'- Point the orchestrator at it:
KICI_SCALER_CONFIG_PATH=/etc/kici/scalers.yamlFor multi-file configurations, also set KICI_SCALER_CONFIG_DIR=/etc/kici/scalers.d/.
- Restart the orchestrator. It now auto-provisions container agents when jobs arrive with
runsOn: ['linux', 'container'].
Which backend?
Section titled “Which backend?”| Backend | Provisions | Choose it for |
|---|---|---|
container | Docker / Podman containers | Linux CI on shared infrastructure — the common deployment. |
bare-metal | Host child processes | macOS, Windows, GPU, or specialized hardware workloads. |
firecracker | KVM microVMs | Untrusted / multi-tenant workloads needing hardware isolation. |
event | Cloud instances, through your own provisioning workflow | Cloud autoscaling without a built-in cloud SDK. |
Caps in a cluster
Section titled “Caps in a cluster”maxAgents means different things on a local backend and on the event backend, and the difference matters as soon as you run more than one orchestrator against one shared database.
| Cap | Counted | Bounds |
|---|---|---|
maxAgents on an event scaler | Across the cluster | The number of cloud instances that scaler runs |
maxAgents on container / bare-metal / firecracker | Per orchestrator | The agents that one host runs |
globalMaxAgents | Per orchestrator | The agents that one host runs, across its scalers |
A local backend runs its compute on the orchestrator’s own machine, so its cap is a statement about that machine’s CPU, memory, and disk. Counting it across the cluster would let one busy host take the whole budget and exhaust itself. Two orchestrators that each set maxAgents: 10 on a container scaler therefore run up to 10 containers each, and 20 together.
An event scaler runs no local compute. It asks a provisioning workflow to boot a cloud instance, and any coordinator can ask. Its cap is a statement about the cloud bill, so it is counted and claimed cluster-wide, inside one database transaction. Two coordinators that each set maxAgents: 10 on the same event scaler run 10 instances in total. See Event scaler high availability.
Reference
Section titled “Reference”| Page | Covers |
|---|---|
| Common configuration | Fields shared across all backends: top-level schema, label sets, resource caps, warm pool, roles, mandatory/exclude labels, env forwarding, network policy, backpressure. |
| Operations | Running and observing: label matching, multi-scaler layout, deployment topology, SIGHUP reload, monitoring, troubleshooting, multi-backend examples. |
| Container backend | Container-specific fields, runtime auto-detection, lifecycle, registry auth, the container-socket security warning. |
| Bare-metal backend | Host child processes, cgroup enforcement, network access, remote macOS / Windows orchestrator setup. |
| Firecracker backend | VM networking, jailer fields, rootfs, DB migration, the MMDS credential model, helper scripts. |
| Event backend | Cloud autoscaling driven by your own provisioning workflow: event fields, claim codes, cluster-wide caps, the teardown reaper. |
See also
Section titled “See also”- Agent execution security — how each backend confines customer workflow code; read this before exposing a scaler to untrusted workloads.
- Firecracker host setup — Firecracker host provisioning, networking, jailer, IP allocation, troubleshooting.
- Configuration reference — orchestrator environment variables including
KICI_SCALER_CONFIG_PATHandKICI_SCALER_CONFIG_DIR. - Architecture overview — three-tier relay model and component responsibilities.
- Agent configuration — environment variables for agents connecting to the orchestrator.
- Orchestrator getting started — deployment guide with Docker Compose examples.