Package hostcapacity refuses new runs while the host is short of memory or
over a load ceiling, so a burst of launches cannot push the machine that
hosts the daemon (and everything else on it) into swap or an OOM kill.
ReadProc reads MemAvailable from /proc/meminfo and the 1-minute load average
from /proc/loadavg. In a container or a kind node these describe the kernel
the daemon runs on (on WSL2, the whole VM), not a cgroup's share of it.
type Limits struct {
MinAvailableMiB int// refuse while MemAvailable is below this many MiB MaxLoad1 int// refuse while the 1-minute load average is above this}
Limits are the admission thresholds. A zero field disables that check, and
the zero value disables the guard entirely.