Skip to content

feat: unify built-in image registry routing - #169

Draft
bugkeep wants to merge 1 commit into
masterfrom
feat/registry-mirror-fallback-review
Draft

feat: unify built-in image registry routing#169
bugkeep wants to merge 1 commit into
masterfrom
feat/registry-mirror-fallback-review

Conversation

@bugkeep

@bugkeep bugkeep commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep all seven built-in image references on their canonical registries
  • add imageRegistryMirror = auto | always | never with auto as the default
  • in auto, probe https://registry-1.docker.io/v2/ once at startup with a 4-second timeout; any HTTP response, including 401, means Docker Hub is reachable
  • enable containerd mirror hosts only when the selected mode requires them, while retaining the canonical registries as fallbacks
  • return the same Docker Hub and Kubernetes registry hosts.toml files from the manual worker join API when mirrors are enabled
  • make registry routing independent of the optional SOCKS5 proxy setting

Compatibility

  • auto preserves direct official-registry access where it works and enables mirrors only when the Docker Hub probe cannot connect
  • always and never provide explicit overrides; invalid values reject startup
  • containerd's config_path remains configured so administrators can manage their own certs.d entries
  • switching mirrors off removes only hosts.toml files marked as generated by CasOS; administrator-managed files are preserved
  • existing SOCKS5 application proxy behavior is unchanged

Validation

  • commit a7fa5261
  • fork CI: Running Go tests, Back-end, Go-Linter, Front-end, and UI tests passed on feat: unify built-in image registry routing #169
  • temporary local tests covered mirror file generation, transition cleanup, administrator-file preservation, and cleanup error propagation; no test file is included in this PR
  • go test ./...
  • go vet ./...
  • go build ./...

@bugkeep
bugkeep force-pushed the feat/registry-mirror-fallback-review branch from 5d2738b to a7fa526 Compare July 26, 2026 08:59
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.

1 participant