builder: wire up new gc types for buildkit prune functionality

This wires up the new gc types that buildkit exposes in version 0.17.
The previous flag, `KeepBytes`, was renamed to `ReservedBytes` and two
new options, `MaxUsed` and `MinFree` were added.

`MaxUsed` corresponds to the maximum amount of space that buildkit will
use for the build cache and `MinFree` amount of free disk space for the
system to prevent the cache from using that space. This allows greater
configuration of the cache storage usage when used in situations where
docker is not the only service on the system using disk space.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2025-01-30 09:54:12 -06:00
parent 1153242d3a
commit 8e529682af
12 changed files with 292 additions and 95 deletions

View File

@@ -71,6 +71,8 @@ keywords: "API, Docker, rcli, REST, documentation"
`GET /debug/pprof/profile`, `GET /debug/pprof/symbol`, `GET /debug/pprof/trace`,
`GET /debug/pprof/{name}`) are now also accessible through the versioned-API
paths (`/v<API-version>/<endpoint>`).
* `POST /build/prune` renames `keep-bytes` to `reserved-space` and now supports
additional prune parameters `max-used-space` and `min-free-space`.
## v1.47 API changes