-
Notifications
You must be signed in to change notification settings - Fork 97
Add arm multi platform support #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add arm multi platform support #659
Conversation
- Update Dockerfile to support multi-platform builds using BUILDPLATFORM and TARGETPLATFORM - Add default values for backward compatibility with regular docker build - Update GitHub Actions workflow to use docker buildx for linux/amd64 and linux/arm64 - Simplify Makefile docker-buildx target to directly use updated Dockerfile - Remove platform hardcoding and enable cross-platform builds Fixes meshery#355 Signed-off-by: dharam <[email protected]>
|
@leecalcote Could you review this PR? |
|
Squash your commits. There are entirely too many. Explain how your changes make the embedded sqlite ARM compatible. |
|
Signoff on your commits. |
|
List the LLM model and version that you're using. |
This change does not touch sqlite. the Meshery Operator doesn’t embed or link sqlite; its a controller binary built statically with CGO disabled and packaged on distroless. I only enabled multi-arch (linux/amd64, linux/arm64) builds via docker buildx. So ARM compatibility here is independent of sqlite |
ccae5fa to
d80e5fd
Compare
ProgrammingPirates
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comment LGTM otherwise
Signed-off-by: Dharmendra solanki <[email protected]>
|
@leecalcote pls review |
|
Where have you explained the cause of the incompatibility and the changes to overcome that cause? |
@leecalcote I have updated the main PR description to include a structured explanation detailing the cause of the incompatibility and the changes to overcome it using Docker Buildx and dynamic platform variables. Please let me know if this clarifies things sufficiently for you! |
|
@ProgrammingPirates you're right about sqlite. When I first took a quick look, I thought this PR was on meshery/meshery. |
|
Join tomorrow's dev meeting. Add this PR as an agenda item, yeah? |
|
@ProgrammingPirates drop your agenda item here -https://docs.google.com/document/d/15IEwtTxPOkQXN2r_1LzGXuAv2mIUlmbdtmxpyxXF-KI/edit?tab=t.0 |
leecalcote
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ProgrammingPirates, please reuse (copy/paste) our multi-platform.yml workflow (used broadly across Meshery repos) for ARM support - https://github.com/meshery-extensions/meshery-istio/blob/master/.github/workflows/multi-platform.yml
Rationale for Multi-Platform Support
1. Cause of Incompatibility:
The previous build process created images only for the host architecture (implicitly
linux/amd64). This caused the Meshery Operator to fail with an "Exec format error" when run on modern ARM-based hardware (e.g., Apple Silicon or cloud instances like AWS Graviton). The single-architecture image was incompatible with the multi-architecture runtime environment.2. Changes to Overcome Incompatibility:
To resolve this, I implemented a true multi-platform build strategy:
docker buildxto build and push manifest lists for two architectures:linux/amd64andlinux/arm64.$BUILDPLATFORMand$TARGETPLATFORM. This allows the build process to dynamically compile the application for the correct target architecture, eliminating the need for hardcoding.docker build.Fixes Add support for ARM with a multi platform workflow #355