Skip to content

feat: registry mirror capabilities - #904

Open
tim-mcdonald wants to merge 1 commit into
bottlerocket-os:developfrom
tim-mcdonald:feat/registry-mirror-capabilities
Open

feat: registry mirror capabilities#904
tim-mcdonald wants to merge 1 commit into
bottlerocket-os:developfrom
tim-mcdonald:feat/registry-mirror-capabilities

Conversation

@tim-mcdonald

@tim-mcdonald tim-mcdonald commented Apr 10, 2026

Copy link
Copy Markdown

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: emits capabilities field when configured in mirror settings
  • sources/api/thar-be-registries/src/settings.rs: adds capabilities: Option<Vec<String>> to Mirror
  • sources/api/thar-be-registries/src/main.rs: adds resolve_capabilities helper that maps capability strings to Capability enum values, defaulting to ["pull", "resolve"] when unset

When capabilities is 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 if resolve is 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.

@tim-mcdonald
tim-mcdonald force-pushed the feat/registry-mirror-capabilities branch from ddf43a1 to 56ccec8 Compare April 10, 2026 17:10
@tim-mcdonald tim-mcdonald changed the title Feat/registry mirror capabilities feat: registry mirror capabilities Apr 10, 2026
…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
tim-mcdonald force-pushed the feat/registry-mirror-capabilities branch from 56ccec8 to 62fd674 Compare April 10, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(thar-be-registries): add configurable capabilities per registry mirror

1 participant