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§
- Budget
Block - A profile’s slots or the mirror, as a budget preview draws it, from
Config::budget_blocks. - Build
Cache [caches.build]: the build cache every runner shares (ADR 0052): Gradle’s, and the other tools’ the runner image points at it. Every field has a default.- Byte
Size - A size in bytes, written with a binary unit as Docker and systemd do:
512M,9G,32.5G. - Cache
Limit - A size limit on a shared cache.
- Caches
[caches]: what runners share and keep between jobs.- Check
Budget - What a checked config’s admission rule holds to
MemoryMax, fromConfigCheck::budget. - Config
- A parsed
runnerd.toml.validatechecks it against the host’s budget. - DayTime
- A time of day,
HH:MM, 24-hour. - 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.
- Notify
[notify]: where the daemon sends notifications (ADR 0051). Without targets nothing leaves the machine.- Notify
Target [[notify.targets]]: one place notifications go.- Origin
- An origin as a browser sends it in
Origin:https://host[:port], orhttp://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_failuresunder a profile turns them on). When a new record would pass a limit, the oldest records go first. Every field has a default.- Remainder
- What
MemoryMaxleaves past a check’s budget, or how far the budget goes past it. - Repository
- A repository to serve:
[[repositories]]. Each entry is one of the repository’s pools; entries with the samenameserve it in several profiles, each with its own labels, which no two of them share (ADR 0058). - Secret
- A value no
Debugoutput, log line or error shows: a notification target’s URL or header. - Sizing
[sizing]: howrunnerctl sizingturns 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 astailscale serve. Read when the daemon starts.
Enums§
- Admission
admissionunder[host]: what a new runner must fit in the slice’sMemoryMaxbeside the running ones.- Build
Cache Writers build_cache_writersof a[[repositories]]: whose jobs’ uploads the shared build cache keeps (ADR 0053).- Config
Error - Why a config cannot be used.
- Image
- The image a profile’s runners run.
- Isolation
- How runner containers are kept from the host:
isolationunder[host]. - Notify
Kind - What a notification target takes.
- Resize
Error - Why
resize_profilecannot change a config. - Verdict
- A config check’s verdict, from
ConfigCheck::verdict. - Warning
- What a valid config should still fix.
Constants§
- MAX_
CPU_ OVERCOMMIT - The largest
cpu_overcommitthe 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.21. - SECRET_
SHOWN - What
GET /v1/configshows in place of a notification target’s URL and header values (ADR 0051).
Functions§
- cpu_
budget - The CPU budget, in millicores, of
millicoresof CPUs overcommittedovercommittimes. - keep_
secrets textwith eachSECRET_SHOWNin a target’surlor headers replaced by the valuestoredhas for the target of the same name, everything else as written: whatPUT /v1/configandPOST /v1/config/checkread, so a config shown masked saves with its secrets. A value with nothing to keep staysSECRET_SHOWN, whichConfig::validaterefuses. A text that does not parse as a config is answered as sent: a TOML error quotes the line it is on, and that line must hold the mask, not the value put back. One that parses still does with the values put back, as they are strings where strings were, andConfig::validatenames a target’s field, never its value.- labels_
match - Whether a job asking for
wantedmay run on runners registered withlabels: every label it asks for is one of theirs. GitHub compares labels without regard to case. A job asking for no label, as one that names only a runner group, matches no runners: nothing says which pool it is for (ADR 0058). - mask_
secrets textwith each[[notify.targets]]entry’surland header values shown asSECRET_SHOWN, everything else as written: whatGET /v1/configanswers, so no client, the dashboard’s browsers included, holds them.Nonewhentextis not TOML.- parse_
age - Parses an age as the clients’
--sinceand--older-thantake 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
MemoryMaxvalue assystemctl showprints it: bytes, orinfinity. - parse_
slice_ cpus - The CPUs, in millicores, that
systemctl show’sEffectiveCPUs,AllowedCPUsandCPUQuotaPerSecUSeclines leave a slice on a host withhostCPUs;Nonewhen a value does not parse. - resize_
profile textwith the profile’smemoryandslotsreplaced, and itscpuswhenresizehas them, everything else as written, comments included: what applying a sizing suggestion sends toPUT /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(orAllowedCPUs, else the host’s CPUs), less when itsCPUQuotais lower. - slice_
memory_ max - Reads a slice’s
MemoryMaxfrom systemd;Nonewhen it is unlimited.