fix: build arm harbor v2.10.2
What type of PR is this?
/kind feature
What this PR does / why we need it:
harbor don't have arm image. so build it
Which issue(s) this PR fixes:
Fixes # https://github.com/kubesphere/kubekey/issues/2891
Special notes for reviewers:
Does this PR introduced a user-facing change?
build arm harbor v2.10.2
Additional documentation, usage docs, etc.:
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: redscholar
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [redscholar]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Summary of Changes
Hello @redscholar, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request addresses the lack of ARM images for Harbor by implementing a robust build process for Harbor v2.10.2 on ARM architecture. It achieves this by introducing a new Makefile that orchestrates the build and applies a significant patch to the upstream Harbor build system. The patch enables docker buildx for multi-platform image creation and refactors several Dockerfiles to use multi-stage builds, ensuring that Go-based components are compiled for the target architecture directly within the build pipeline. This change allows for the generation of ARM-compatible Harbor offline installers.
Highlights
- ARM Architecture Support: Introduced the capability to build Harbor v2.10.2 specifically for ARM architecture, addressing the current lack of official ARM images.
- Multi-Architecture Builds: Leveraged
docker buildxto enable multi-platform image building, allowing a single build process to produce images compatible with bothlinux/amd64andlinux/arm64. - Refactored Dockerfiles: Updated several component Dockerfiles (core, jobservice, registry, registryctl, trivy-adapter) to utilize multi-stage builds, compiling Go binaries from source within dedicated build stages for better control and platform compatibility.
- Streamlined Build Process: Modified the main Makefile to simplify conditional image building logic and ensure platform-specific image pulling for offline packages, improving the overall build efficiency and accuracy.
Ignored Files
- Ignored by pattern:
.github/workflows/**(1)- .github/workflows/gen-repository-iso.yaml
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
This PR has multiple commits, and the default merge method is: squash. You can request commits to be merged using the label: tide/merge-method-merge
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
