feat: registry mirror capabilities - #904
Open
tim-mcdonald wants to merge 1 commit into
Open
Conversation
tim-mcdonald
force-pushed
the
feat/registry-mirror-capabilities
branch
from
April 10, 2026 17:10
ddf43a1 to
56ccec8
Compare
…mirror Replaces hardcoded ["pull", "resolve"] with per-mirror capabilities read from settings. Defaults to ["pull", "resolve"] when not specified for backward compatibility. - packages/os/thar-be-registries-toml: emits capabilities field when configured - sources/api/thar-be-registries/src/settings.rs: adds capabilities field to Mirror - sources/api/thar-be-registries/src/main.rs: adds resolve_capabilities helper Closes: bottlerocket-os#903 See: bottlerocket-os/bottlerocket#4710
tim-mcdonald
force-pushed
the
feat/registry-mirror-capabilities
branch
from
April 10, 2026 17:14
56ccec8 to
62fd674
Compare
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.
Issue number:
Closes #903
Description of changes:
Adds per-mirror capability configuration to
thar-be-registries, replacing the hardcoded["pull", "resolve"]for all registry mirror endpoints.Changes:
packages/os/thar-be-registries-toml: emitscapabilitiesfield when configured in mirror settingssources/api/thar-be-registries/src/settings.rs: addscapabilities: Option<Vec<String>>toMirrorsources/api/thar-be-registries/src/main.rs: addsresolve_capabilitieshelper that maps capability strings toCapabilityenum values, defaulting to["pull", "resolve"]when unsetWhen
capabilitiesis not specified, behavior is unchanged (backward compatible). Unknown capability strings are skipped with a warning.This unblocks tools like Spegel that require
pull-only mirrors. containerd 2.1's transfer service fails when Spegel's DHT hasn't initialized ifresolveis also requested. See bottlerocket-os/bottlerocket#4710.Depends on bottlerocket-os/bottlerocket-settings-sdk#134.
Testing done:
cargo test -p thar-be-registries
50 tests pass (42 pre-existing + 8 new).
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.