Skip to content

Full Multi-Architecture Enablement for Harbor (amd64 + arm64) - #22311

Merged
Vad1mo merged 45 commits into
goharbor:mainfrom
ranimandepudi:arm64-ci-support
May 12, 2026
Merged

Vad1mo merged 45 commits into
goharbor:mainfrom
ranimandepudi:arm64-ci-support

Conversation

@ranimandepudi

@ranimandepudi ranimandepudi commented Sep 2, 2025 •

Copy link
Copy Markdown
Contributor

This PR completes the multi-architecture enablement for Harbor. It builds on #22229 and expands it from CI-only coverage into full tooling, release plumbing, and multi-arch image publishing.

Changes:

Step 1: CI Matrix:

  • Updated .github/workflows/CI.yml to run all PR test jobs on both amd64 and arm64.
  • Added strategy.matrix.arch: [amd64, arm64] for jobs:
    UTTEST
    APITEST_DB
    APITEST_DB_PROXY_CACHE
    APITEST_LDAP
    OFFLINE
    UI_UT
  • amd64 jobs continue unchanged on ubuntu-latest.
  • arm64 jobs run on GitHub-hosted ubuntu-24.04-arm runners.
  • Exposed ARCH=${{ matrix.arch }} in the environment.
  • Codecov uploads are tagged by arch for clarity.

Step 2: Tooling Neutrality:

  • tools/migrate_chart: Dockerfile + Python entrypoint updated to select correct Helm binary for both amd64 and arm64.
  • tools/spectral: Dockerfile updated to download correct Spectral binary per arch.
  • tests/test-engine-image/Dockerfile.common: added arch-awareness for containerd, helm, ORAS, wasm-to-oci, cosign, imgpkg, notation. On arm64, wasm-to-oci is built from source.
  • Ensures all helper/tooling images work natively on both architectures.

Step 3: Release Plumbing:

  • Updated .github/workflows/build-package.yml to produce both amd64 and arm64 installers.
  • Updated .github/workflows/publish_release.yml to handle per-arch offline/online bundles.
  • Patched tools/release/release_utils.sh to push per-arch image tags (-amd64, -arm64).
  • docker_compose.py updated to render platform: linux/amd64 or linux/arm64 dynamically.

Step 4: Multi-Arch Image Publishing:

  • In publish_release.yml, added docker buildx imagetools create per-arch images into unified multi-arch manifests.
  • Harbor component images (core, jobservice, registryctl, portal, etc.) are now published under a single tag (goharbor/:vX.Y.Z) that transparently resolves to the right arch.
  • Mirrors existing Harbor release process: no user-facing change except that arm64 is now supported equally.

Expected Behavior:

PR CI runs on both amd64 and arm64; all jobs pass (offline + online).
Offline and online installers are produced for both arches.
docker pull goharbor/core: resolves automatically to the native image on amd64 or arm64.
Developers can build and run Harbor from source on arm64 using:
make compile
make build -e VERSIONTAG=dev -e BASEIMAGETAG=dev -e PULL_BASE_FROM_DOCKERHUB=false -e PUSHBASEIMAGE=false -e BUILD_BASE=true -e TRIVYFLAG=true -e BUILDTRIVYADP=true

RoadMap Discussed:

Step 1: CI coverage
Step 2: Tooling Neutrality
Step 3: Release Plumbing
Step 4: Multi-Arch image publishing

With this PR, Harbor achieves full parity on amd64 and arm64, covering source builds, CI, release workflows, and published images.

Thanks

Thanks to the Harbor maintainers and community for reviewing this. This contribution ensures Harbor is production-ready on modern Arm platforms, aligning with CNCF best practices for multi-arch support.

@chlins chlins added the release-note/infra Infra related changes e.g. release, test, ship etc... label Sep 3, 2025
@codecov

codecov Bot commented Sep 3, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.02%. Comparing base (2cc8623) to head (4df55b3).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #22311      +/-   ##
==========================================
- Coverage   66.04%   66.02%   -0.02%     
==========================================
  Files        1074     1074              
  Lines      116799   116799              
  Branches     2955     2955              
==========================================
- Hits        77139    77121      -18     
- Misses      35380    35393      +13     
- Partials     4280     4285       +5     
Flag Coverage Δ
unittests 66.02% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread .github/workflows/CI.yml Fixed
@ranimandepudi

Copy link
Copy Markdown
Contributor Author

@wy65701436 @OrlinVasilev @chlins Any suggestions on the pr ?

@Vad1mo

Vad1mo commented Sep 5, 2025

Copy link
Copy Markdown
Member

@ranimandepudi, can you resolve the conflicts.

  • can you explain why the test fails for ARM?

This is a more general question: So we actually need to perform all the tests on both architectures, AMD and ARM?

@wy65701436 wy65701436 assigned chlins and unassigned OrlinVasilev Sep 8, 2025
@ranimandepudi

Copy link
Copy Markdown
Contributor Author

@Vad1mo
Offline installer tests pass on both arm and amd - so the images building are arch neutral and healthy !!
The online failed on arm64 as they are trying to pull Harbor images from Docket hub and those are amd64 only today!!
Next steps: We can either patch CI to use the locally build multi-arch images for arm64 runs or leave the failures until official arm64 images are published !!
Once reviewd I can move forward with next steps where I will be pushing the next pr on: Tooling images !!

@ranimandepudi

Copy link
Copy Markdown
Contributor Author

@wy65701436 @OrlinVasilev @chlins Can you please review it ?

Comment thread .github/workflows/CI.yml Resolved
@chlins

chlins commented Sep 19, 2025

Copy link
Copy Markdown
Member

@ranimandepudi Please resolve the conflict, and it seems it will break current CI pass right now.

@ranimandepudi ranimandepudi changed the title Step 1: Enable Harbor CI on both amd64 and arm64 Full Multi-Architecture Enablement for Harbor (amd64 + arm64) Sep 22, 2025
@ranimandepudi

Copy link
Copy Markdown
Contributor Author

@Vad1mo @chlins @wy65701436 @OrlinVasilev
Can you review the PR. The PR needs at least one approval from maintainers for CI checks !!

@chlins

chlins commented Sep 23, 2025

Copy link
Copy Markdown
Member

@Vad1mo @chlins @wy65701436 @OrlinVasilev Can you review the PR. The PR needs at least one approval from maintainers for CI checks !!

@ranimandepudi CI rerun failed, please fix the failed actions.

Comment thread .github/workflows/CI.yml Fixed
Signed-off-by: Rani Chowdary Mandepudi <[email protected]>
Comment thread Makefile Resolved
Comment thread tools/spectral/Dockerfile Resolved
@OrlinVasilev
OrlinVasilev disabled auto-merge May 5, 2026 12:21
@OrlinVasilev

Copy link
Copy Markdown
Member

@wy65701436 looks like we are good to merge ?

@danacr

danacr commented May 8, 2026

Copy link
Copy Markdown

@wy65701436 @chlins Can you please review this PR ?

@bupd bupd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

I have tested and verified the builds and the ci - works as expected.
Thanks everyone.

@Shion1305

Copy link
Copy Markdown

Hi team, could you please let me know if there’s an expected timeline for merging this? Thanks!

@Vad1mo
Vad1mo merged commit 18f7abd into goharbor:main May 12, 2026
11 of 12 checks passed
bupd added a commit to container-registry/harbor-next that referenced this pull request Jun 11, 2026
dasomel added a commit to dasomel/harbor that referenced this pull request Jul 7, 2026
…ation

- README: add Known Limitations (exporter amd64-only on v2.15.x tags,
  root-caused to upstream GOARCH=amd64 hardcode since v2.2.0; fix goharbor#22311
  is master-only/unreleased) + :latest-tracks-newest-build note +
  redis->valkey (v2.15.2, goharbor#23157) cache-backend note.
- plan doc: correct the false "v2.15.2+ ships multiarch exporter" claim
  (multiarch exporter Dockerfile is fork-main-only, absent from all GA
  tags) and record the 2026-07-07 :latest->v2.15.2 reconciliation run
  (run 28865019658; latest==v2.15.2 verified for all 7 tag-published
  components incl valkey-photon).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
dasomel added a commit to dasomel/harbor that referenced this pull request Jul 7, 2026
… to main, release-pending

goharbor#22311 "Full Multi-Architecture Enablement" is merged to
upstream main (2026-05-12) and already synced into this fork's main
(exporter Dockerfile now uses GOARCH=${TARGETARCH}), but is in no release
tag yet — all v2.15.x predate it. Records:
- README: exporter note updated (fix merged+synced, not just "on master").
- plan doc: new "Upstream tracking goharbor#22311" subsection — fork's own
  exporter Dockerfile.multiarch is now redundant on main; and the
  build-package.yml exporter skip must be lifted for the first release
  containing goharbor#22311 (expected v2.16.0), while v2.15.x keeps the skip.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
stonezdj added a commit to stonezdj/harbor that referenced this pull request Oct 27, 2026
PR goharbor#22311 (goharbor#22311) introduced an
empty online installer argument for RC releases. The unquoted argument
was omitted, shifting the remaining arguments and leaving getAssets
without its final assetsPath parameter.

Quote all getAssets arguments to preserve the empty argument.

Signed-off-by: stonezdj <[email protected]>
wy65701436 pushed a commit that referenced this pull request Oct 27, 2026
fix(release): handle empty parameter introduced by #22311

PR #22311 (#22311) introduced an
empty online installer argument for RC releases. The unquoted argument
was omitted, shifting the remaining arguments and leaving getAssets
without its final assetsPath parameter.

Quote all getAssets arguments to preserve the empty argument.

(cherry picked from commit 27ea4ac)

Signed-off-by: stonezdj <[email protected]>
wy65701436 pushed a commit that referenced this pull request Oct 27, 2026
fix(release): handle empty parameter introduced by #22311

PR #22311 (#22311) introduced an
empty online installer argument for RC releases. The unquoted argument
was omitted, shifting the remaining arguments and leaving getAssets
without its final assetsPath parameter.

Quote all getAssets arguments to preserve the empty argument.

Signed-off-by: stonezdj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/infra Infra related changes e.g. release, test, ship etc... release-note/new-feature New Harbor Feature target/2.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.