-
Notifications
You must be signed in to change notification settings - Fork 401
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
Support Builds for ARM M1 Macs #477
Conversation
Good job , could you pass the DCO verification ? |
Signed-off-by: Claus Strasburger <c@cfs.im>
Signed-off-by: Claus Strasburger <c@cfs.im>
Signed-off-by: Claus Strasburger <c@cfs.im>
Signed-off-by: Claus Strasburger <c@cfs.im>
@scbizu Should be good to go now :) |
The containerd dependency is from the helm dependency though ... However , we can not bump our helm dependency to the latest version due to one potential break change . And so , this PR may should be merged after we fixed the caveat ? (After v0.14.0 , we need to deprecate the invalid semantic version by default and bump our Helm dependency to the latest and then we can also bump the containerd dependency to fix the caveat). |
I don't you need hold this back -- as mentioned, the error message is purely cosmetic, and has no implications on chartmuseum itself (apart from being slightly annoying). Being able to build this on M1 with a weird log entry is better than not being able to run it at all ;) |
Sounds right , I can merge this in and it (the weird error message ) will disappear after we bump the containerd dependency , right ? |
Correct, that should be the case. (noticed that the build failed though, it looks like helm does not live at https://storage.googleapis.com/kubernetes-helm/ anymore, but here: https://github.com/helm/helm/releases/tag/v2.17.0) |
Thank you , I will merge it and then fix the CI 😆 |
Summary
This PR adds build targets to the makefile to support building for darwin/arm64, which is the architecture for Apples processors going forward from the M1.
It also adds support for the arch in the get-chartmuseum script, which will then attempt to download the version. As soon as the first version with this build is released, everybody can enjoy it :)
Also added
.PHONY
labels to the other build-* targets, to prevent make confusion when files called build-* exist.Testing
Successfully tested on an M1 MBP, macOS 11.5.2.
Caveat
Unfortunately, there is a cosmetic error message at the start coming from containerd, because it tries to call
getCPUInfo()
on every ARM arch:See https://github.com/containerd/containerd/blob/v1.3.4/platforms/cpuinfo.go#L77-L93.
The bug is already fixed since 1.4.0 of containerd/containerd: containerd/containerd@7119a2a, but indirect dependencies still pull in old versions.