Skip to content
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

Add arm64 platform support to Docker builds #64

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

suin
Copy link
Contributor

@suin suin commented Dec 10, 2024

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • Y

re #63

2. What is the scope of this PR (e.g. component or file name):

.github/workflows/release.yaml

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

This PR adds ARM64 support to the Docker images by modifying the GitHub Actions workflow to build multi-architecture images. This enhancement enables users to run the project natively on ARM64 systems like Apple Silicon Macs and AWS Graviton instances.

Changes:

  • Updated .github/workflows/release.yaml to build images for both AMD64 and ARM64
  • No changes to Dockerfile or Go code required as they already support cross-compilation

Implementation:

# Before
platforms: linux/amd64

# After
platforms: linux/amd64,linux/arm64

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

Manual testing performed:

  1. Build and Registry Testing:

    • Successfully built both AMD64 and ARM64 images using GitHub Actions in fork repository
    • Successfully pushed multi-arch images to Quay.io registry
  2. Kubernetes Environment Testing:

    • Platform: AWS EKS cluster with ARM64 EC2 nodes
    • Deployment: Successfully deployed the webhook on ARM64 nodes
    • Functionality: Created KCLRun objects and verified that mutations were correctly applied

This comprehensive testing confirms that the ARM64 build works correctly in a production-like environment, maintaining all expected functionality of the webhook.

@suin
Copy link
Contributor Author

suin commented Dec 10, 2024

I've submitted this PR to demonstrate one possible approach to the ARM64 support discussed in #64. If you have a different direction in mind or see any concerns with this approach, please feel free to let me know. I'm happy to adjust or reconsider the implementation based on your feedback.

Copy link
Contributor

@zong-zhe zong-zhe left a comment

Choose a reason for hiding this comment

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

LGTM ! 😄 Thank you for your contributions and welcome to be a KCL contributor ! cc @He1pa

@He1pa
Copy link

He1pa commented Dec 10, 2024

nice work! lgtm

@zong-zhe zong-zhe merged commit fdefa01 into kcl-lang:main Dec 10, 2024
3 of 4 checks passed
@suin suin deleted the arm-support branch December 10, 2024 06:46
@suin
Copy link
Contributor Author

suin commented Dec 10, 2024

Thank you for the review and merge! Happy to contribute to the KCL project. 🙂

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.

3 participants