Skip to content

feat(installer): detect a blocked container registry + guide to mirror/offline (#585) - #601

Merged
shujaatTracebloc merged 3 commits into
developfrom
fix/585-registry-mirror
Aug 5, 2026
Merged

feat(installer): detect a blocked container registry + guide to mirror/offline (#585)#601
shujaatTracebloc merged 3 commits into
developfrom
fix/585-registry-mirror

Conversation

@shujaatTracebloc

@shujaatTraceblocshujaatTracebloc commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What & why

Child 4/4 of #578 (network resilience) — first slice: detection + clean guidance. (Contributes to #585; the mirror/air-gap wiring and the offline image bundle are follow-on slices — see below.)

Some sites hard-block Docker Hub / GHCR outright, so the images aren't reachable directly at all — distinct from a proxy or TLS-inspection (covered by #582/#583). This slice makes the installer recognize that specific case and guide the user to the mirror / offline options in plain language, staying a clean preflight stop rather than a raw pull failure (builds on #576/#577/#582).

Changes

  • preflight.sh — after the existing connectivity hints, if any failed critical host is a container registry (registry-1.docker.io / auth.docker.io / ghcr.io), print mirror/offline guidance pointing at docs/INSTALL.md. Reuses the connectivity probe from Network resilience (1/4): preflight network probe + plain-language network profile #582; no new network calls.
  • install-k8s.ps1 — same, via a $regBlocked flag in Test-Preflight (cross-platform, one-to-one copy).
  • docs/INSTALL.md — new "Blocked container registry (mirror / air-gapped)" section: point the install at a reachable mirror via TRACEBLOC_VALUES_FILE overriding images.*.registry (+ dockerRegistry creds for a private mirror), with a concrete values example; note the air-gapped-bundle path (tracked for the next slice); and state the honest limit (a site that blocks the registries and has no mirror and won't accept an offline bundle can't be served).

Scope note (this is one slice of the #585 epic)

  • This PR: detection of a blocked registry + plain-language guidance + docs for the mirror path (which the chart + TRACEBLOC_VALUES_FILE already support).
  • Follow-on slices: a one-knob mirror UX (single env → remap all images) and the air-gapped image bundle (pre-load images into the cluster) for fully offline sites.

Acceptance mapping

  • "Detection + clean guidance, never a raw failure" → ✅ this slice.
  • "A blocked-registry site can complete via mirror or air-gapped bundle" → mirror path documented + usable today via TRACEBLOC_VALUES_FILE; air-gapped bundle is the next slice.

Tests

  • bats: the registry-block guidance fires when a registry host is blocked, and does not fire when only a non-registry host (the backend API) fails.
  • Pester:Test-Preflight carries the $regBlocked detection + the guidance line + the docs pointer.
  • Full Pester 448/0/9; preflight.bats 124/0; check-facts + check-style + manifest --check clean (preflight.sh/install-k8s.ps1 are manifested — manifest regenerated).

Note

Low Risk
Installer preflight messaging and documentation only; no change to pull logic or cluster provisioning.

Overview
When preflight sees Docker Hub / GHCR as unreachable (not just any egress failure), the installer now adds a dedicated hint about using a mirror via TRACEBLOC_VALUES_FILE or a future air-gapped bundle, instead of leaving users with only the generic allowlist message. The same logic is in preflight.sh and install-k8s.ps1 ($regBlocked).

docs/INSTALL.md gains a Blocked container registry section with a concrete mirror-values.yaml example (images.*.registry, ingestor repository, optional dockerRegistry creds), a pointer to the offline-bundle work (#585), and the honest limit when no mirror or bundle is possible.

Tests assert registry-only failures trigger the new guidance (bats + Pester); non-registry failures do not. Script manifest hashes are updated.

Reviewed by Cursor Bugbot for commit aa973d9. Bugbot is set up for automated code reviews on this repo. Configure here.

…r/offline (#585)
Child 4/4 of #578, first slice: detection + clean guidance (the acceptance's core;
the mirror/air-gap mechanisms + the offline bundle are follow-on slices).
Some sites hard-block Docker Hub / GHCR outright — the images aren't reachable
directly at all (distinct from a proxy or TLS-inspection). The preflight connectivity
check already probes the registry hosts; now, when the blocked hosts are specifically
the CONTAINER REGISTRIES, the installer surfaces the mirror / offline options in plain
language instead of leaving only the generic egress hint — and it stays a clean
preflight stop, never a raw pull failure (builds on #576/#577/#582).
- preflight.sh: after the connectivity hints, if any failed critical is a registry
host (registry-1.docker.io / auth.docker.io / ghcr.io), print mirror/offline guidance
pointing at docs/INSTALL.md.
- install-k8s.ps1: same, via a $regBlocked flag in Test-Preflight.
- docs/INSTALL.md: new "Blocked container registry (mirror / air-gapped)" section —
point the install at a reachable mirror via TRACEBLOC_VALUES_FILE overriding
images.*.registry (+ dockerRegistry creds), or an air-gapped bundle for fully offline
sites, with the honest limit stated.
Tests: bats — the registry-block guidance fires when a registry is blocked and does NOT
fire when only a non-registry host fails; Pester — Test-Preflight carries the detection
+ guidance + docs pointer. preflight.sh + install-k8s.ps1 are manifested; manifest
regenerated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shujaatTraceblocshujaatTracebloc self-assigned this Aug 5, 2026
shujaatTraceblocand others added 2 commits August 5, 2026 09:45
The bats-hygiene gate (#527) flagged the four bare `[[ … ]]` assertions in the two
#585 preflight tests as advisory — under bats a non-final bare test can't fail its
@test. Append `|| return 1` so they actually enforce. Fixes the "Unit tests" +
"bats (bash unit, mocked)" CI failures on this branch.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shujaatTracebloc
shujaatTracebloc marked this pull request as ready for review August 5, 2026 08:10
@shujaatTracebloc
shujaatTracebloc merged commit 14b328a into developAug 5, 2026
54 checks passed
@shujaatTracebloc
shujaatTracebloc deleted the fix/585-registry-mirror branch August 5, 2026 08:18
Sign up for freeto 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.

3 participants

@shujaatTracebloc@aptracebloc@LukasWodka