Skip to content

Add arm multi platform support#659

Open
dharmendra-byte wants to merge 3 commits into
meshery:masterfrom
dharmendra-byte:add-arm-multi-platform-support
Open

Add arm multi platform support#659
dharmendra-byte wants to merge 3 commits into
meshery:masterfrom
dharmendra-byte:add-arm-multi-platform-support

Conversation

@dharmendra-byte
Copy link
Copy Markdown
Contributor

@dharmendra-byte dharmendra-byte commented Nov 11, 2025

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 Buildx Integration: Updated the GitHub Actions workflow to leverage docker buildx to build and push manifest lists for two architectures: linux/amd64 and linux/arm64.
  • Dynamic Dockerfile: Updated the Dockerfile to use the built-in variables $BUILDPLATFORM and $TARGETPLATFORM. This allows the build process to dynamically compile the application for the correct target architecture, eliminating the need for hardcoding.
  • Backward Compatibility: Added default values for local development using regular docker build.
    Fixes Add support for ARM with a multi platform workflow #355

- 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 <dharmendra.20208039@mnnit.ac.in>
@dharmendra-byte
Copy link
Copy Markdown
Contributor Author

@leecalcote Could you review this PR?

@leecalcote
Copy link
Copy Markdown
Member

Squash your commits. There are entirely too many.

Explain how your changes make the embedded sqlite ARM compatible.

@leecalcote
Copy link
Copy Markdown
Member

Signoff on your commits.

@leecalcote
Copy link
Copy Markdown
Member

List the LLM model and version that you're using.

@dharmendra-byte
Copy link
Copy Markdown
Contributor Author

dharmendra-byte commented Nov 11, 2025

Squash your commits. There are entirely too many.

Explain how your changes make the embedded sqlite ARM compatible.

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

@dharmendra-byte dharmendra-byte force-pushed the add-arm-multi-platform-support branch from ccae5fa to d80e5fd Compare November 11, 2025 07:35
Copy link
Copy Markdown
Contributor Author

@dharmendra-byte dharmendra-byte left a comment

Choose a reason for hiding this comment

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

Done

Comment thread .github/workflows/build-and-release.yml Outdated
Copy link
Copy Markdown

@lekaf974 lekaf974 left a 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 <78801686+ProgrammingPirates@users.noreply.github.com>
@dharmendra-byte
Copy link
Copy Markdown
Contributor Author

dharmendra-byte commented Nov 14, 2025

@leecalcote pls review

@leecalcote
Copy link
Copy Markdown
Member

Where have you explained the cause of the incompatibility and the changes to overcome that cause?

@dharmendra-byte
Copy link
Copy Markdown
Contributor Author

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!

@leecalcote
Copy link
Copy Markdown
Member

@ProgrammingPirates you're right about sqlite. When I first took a quick look, I thought this PR was on meshery/meshery.

@leecalcote
Copy link
Copy Markdown
Member

Join tomorrow's dev meeting. Add this PR as an agenda item, yeah?

@leecalcote
Copy link
Copy Markdown
Member

@ProgrammingPirates drop your agenda item here -https://docs.google.com/document/d/15IEwtTxPOkQXN2r_1LzGXuAv2mIUlmbdtmxpyxXF-KI/edit?tab=t.0

Copy link
Copy Markdown
Member

@leecalcote leecalcote left a 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

@Rajesh-Nagarajan-11
Copy link
Copy Markdown
Member

Thank you for your contribution! 🎉

If this work is completed, this would be a great item to add to the weekly Meshery Development Meeting agenda.
Please update the meeting document, attend the meeting, and present your progress.

Meeting Details

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
@leecalcote
Copy link
Copy Markdown
Member

@ProgrammingPirates are you going to address my last two comments?

@naman79820
Copy link
Copy Markdown

May i take it over?

@Saanvim11
Copy link
Copy Markdown

Hi @leecalcote and @lekaf974 , I’m interested in working on this issue/PR. If it’s currently stalled or not actively being worked on, I’d be happy to help finish the remaining tasks (workflow reuse + squash commits). Please let me know if I can take this over or contribute alongside

@Bhavika42
Copy link
Copy Markdown

Hi @leecalcote I noticed this PR is currently stalled and that the remaining requested change is to reuse Meshery’s existing multi-platform.yml workflow used across Meshery repositories.
I’m interested in helping if additional support is needed. I can review the referenced workflow, compare it with the current meshery-operator build/release workflow, and prepare a small follow-up PR or assist with the required changes after maintainer confirmation.

Since a couple of contributors have already expressed interest in taking this over, I’ll wait for maintainer guidance before starting work to avoid duplicate effort.

@leecalcote
Copy link
Copy Markdown
Member

@Bhavika42, yes, please do offer review. 👍

Copy link
Copy Markdown

@lekaf974 lekaf974 left a comment

Choose a reason for hiding this comment

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

I think this can be improved a little

@Bhavika42
Copy link
Copy Markdown

Thanks @leecalcote, I’ll review the current workflow changes against the referenced multi-platform.yml workflow and look into the remaining requested improvements.

Copy link
Copy Markdown

@Bhavika42 Bhavika42 left a comment

Choose a reason for hiding this comment

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

One thing I noticed while comparing the changes with the referenced multi-platform.yml workflow is that the multi-platform build logic still seems to be implemented directly inside build-and-release.yml.

It might be cleaner and easier to maintain if the ARM/multi-platform build steps reuse the shared workflow structure already used across Meshery repositories, rather than duplicating the build/push logic here.

Sign up for free to 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.

Add support for ARM with a multi platform workflow

7 participants