Skip to main content

Module config

Module config 

Source
Expand description

runnerd.toml: the repositories to serve, the runner profiles they use, the shared caches and the host budget they must fit in. Builds without the host feature, so clients can read a config; its only I/O is reading the file and asking systemctl for a slice’s MemoryMax. It never talks to Docker or GitHub.

Structs§

ByteSize
A size in bytes, written with a binary unit as Docker and systemd do: 512M, 9G, 32.5G.
CacheLimit
A size limit on a shared cache.
Caches
[caches]: what runners share and keep between jobs.
Config
A parsed runnerd.toml. validate checks it against the host’s budget.
History
[history]: the job history database and how long it keeps what. Every field has a default.
Host
[host]: where runner containers run and how they are isolated.
Mirror
The Docker Hub pull-through mirror shared by all runners.
Origin
An origin as a browser sends it in Origin: https://host[:port], or http:// for a loopback host, in lower case, without the scheme’s default port, and an address written as the URL standard serializes it. Nothing after the port: no path, query or user.
Profile
A runner image with its limits; every job of the profile gets one container with these limits.
Records
[records]: how much the records of failed jobs may keep (record_failures under a profile turns them on). When a new record would pass a limit, the oldest records go first. Every field has a default.
Repository
A repository to serve: [[repositories]].
Sizing
[sizing]: how runnerctl sizing turns the job history’s peaks into advice, and whether the daemon applies it itself. Every field has a default.
Web
[web]: the dashboard behind a reverse proxy, such as tailscale serve. Read when the daemon starts.

Enums§

Admission
admission under [host]: what a new runner must fit in the slice’s MemoryMax beside the running ones.
ConfigError
Why a config cannot be used.
Image
The image a profile’s runners run.
Isolation
How runner containers are kept from the host: isolation under [host].
ResizeError
Why resize_profile cannot change a config.
Warning
What a valid config should still fix.

Constants§

MAX_CPU_OVERCOMMIT
The largest cpu_overcommit the config check takes.
PUBLISHED_RUNNER
Where runnerd’s release workflow publishes the runner images, one tag per stage and version, such as ghcr.io/ayagmar/runnerd-runner:jvm-0.0.8.

Functions§

cpu_budget
The CPU budget, in millicores, of millicores of CPUs overcommitted overcommit times.
parse_age
Parses an age as the clients’ --since and --older-than take it: 30m, 12h, 7d, 2w.
parse_duration
Parses a duration as Go and the registry write it, 30s, 90m, 168h, or in days: 7d.
parse_memory_max
Parses a MemoryMax value as systemctl show prints it: bytes, or infinity.
parse_slice_cpus
The CPUs, in millicores, that systemctl show’s EffectiveCPUs, AllowedCPUs and CPUQuotaPerSecUSec lines leave a slice on a host with host CPUs; None when a value does not parse.
resize_profile
text with the profile’s memory and slots replaced, everything else as written, comments included: what applying a sizing suggestion sends to PUT /v1/config, which validates it.
revision
A config text’s revision: a hash of its bytes (64-bit FNV-1a, in hex), the same in every runnerd. PUT /v1/config?revision= refuses a text sent against another revision than the daemon’s.
slice_cpus
Reads the CPUs a slice’s processes may use from systemd, in millicores: its EffectiveCPUs (or AllowedCPUs, else the host’s CPUs), less when its CPUQuota is lower.
slice_memory_max
Reads a slice’s MemoryMax from systemd; None when it is unlimited.