Preserving Chunked Home Assistant Uploads in Harbor Mirror Pipeline
This push ensures that Home Assistant image layers are uploaded in bounded, chunked requests when mirrored to Harbor, preventing OCI fallback failures and keeping the pipeline reliable.
Implementation: Chunked Publisher Switch in harbor-publish.sh
I added a mirror_copy_from_upstream function in scripts/ci/harbor-publish.sh that detects when the source repository is ghcr.io/home-assistant/home-assistant and switches the regctl config to regctl-chunked-publisher.json. This bounds large layer uploads to individual requests for both scoped and full catalogs, and the main mirror loop now calls that function before copying the image digest.
Verification: Policy and Test Updates for home_assistant Scope
I updated policy/workflows.rego and its test file policy/workflows_test.rego to allow the home_assistant scope and added assertions that the correct regctl config file name is used depending on the image source. The test script scripts/ci/harbor-publish-test.py was extended with a home_assistant parameter in transport_mocks, updated source repository resolution for the Home Assistant image, and a final tailnet_mocks call with home_assistant=True to validate the new logic.
Documentation: Updated harbor-image-mirroring.md
I added a line to docs/harbor-image-mirroring.md noting that the scoped and full catalogs use chunked uploads for Home Assistant, giving operators immediate visibility into the bounded‑upload behavior without digging through the workflow source.
Platform Engineering: Reusable Scoped Publication Pattern
The change establishes a reusable pattern for scoped image publication: detect the service‑specific image, select a dedicated chunked publisher config, update the policy Rego allow‑list, adjust the test mocks, and document the command. The same approach can be applied to any internal service that needs to publish a specific image digest while keeping the broader pipeline locked down, echoing the least‑privilege principles demonstrated in the earlier Tailscale ACL updates.