Repository navigation
Conversation
…ays bounded A platform Stack on Komodo's LXC, urbex-build-cache, prunes every komodo.buildCache.every (24h) BuildKit's cache older than keepFor (168h) and then beyond keepStorage (3GB), and the images no container uses older than keepFor, and logs a line per run to Loki. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
…he compose wrapper The wrapper (sops-tools) isn't on Komodo's own LXC: a platform Stack without secrets now has no secrets file and no wrapper, as the web frontends' Stacks on the builder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
Contributor
Author
|
Run on the test node (2026-11-19, Nothing to free, as expected: 939 MB of cache, under 3GB and under a week old (the platform was rebuilt on 2026-11-17). The freeing itself was shown in docker-in-docker (see Tests). The Stack keeps running and will prune once the cache ages or grows. |
stefanoghinelli
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Komodo builds every image on its own LXC, and BuildKit's cache and the old images grow until the disk is full (#92). A small platform Stack now prunes them on a schedule.
platform/stacks/build-cache/compose.yaml(new): onedocker:clicontainer on Komodo's LXC, with the Docker socket. Everyevery(24h by default, first run 10 minutes after start) it:keepFor(168h):docker builder prune --filter until=...;keepStorage(3GB):docker builder prune --keep-storage .... The two flags together prune only the old entries, so it takes two passes;keepFor:docker image prune --all --filter until=.... Images of running containers are never removed;docker system dfbefore and after (urbex build-cache: ...), which Loki collects.internal/platform/config.go:komodo.buildCache.{keepStorage, keepFor, every}inurbex.platform.yaml, with defaults and validation (sizes like3GB, durations of at least 1h).internal/platform/catalog.go: thebuild-cacheentry, kindplatform, on thekomodoLXC, GitOps-deployed, outbound only (ADR-0027).internal/bootstrap/stacks.go: the Stackurbex-build-cache, on Komodo's server, its settings inconfig.env. A Stack without secrets now gets nosecrets.sops.envand no compose wrapper: the sops wrapper isn't on Komodo's own LXC, and the first e2e run failed on it.e2e/run.sh: the Stack runs, itsconfig.envhas the defaults, it has no secrets file; it stays afterdestroy staging.CHANGELOG.md: under Unreleased.Companion: urbforge/urbex#98.
Why
#92: Komodo's disk fills up with build cache, and the only fix today is pruning by hand.
Tests I ran
mise run test,mise run lint: pass.mise run e2e: passed, 24 steps (bootstrap, a second bootstrap changes nothing, the Stack running, destroy staging keeps it).KEEP_STORAGE=1MBit freed 53 MB of build cache, logged before/after, and the container stayed running.Checklist before review
urbex.kind/urbex.serviceFixes #92
🤖 Generated with Claude Code
https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA