whereabouts
whereabouts copied to clipboard
Support for multiarch images
What this PR does / why we need it:
This PR alters the Dockerfiles for both regular and OpenShift in such a way multiarch images are getting built when using buildkit. Also, the GH workflow actually building the images is prepared for that.
Also, I did a bit of cleaning up to ease testing.
Which issue(s) this PR fixes
Fixes #226
Special notes for your reviewer (optional):
- I've disabled CGO in the OpenShift dockerfile, as it would require a cross compiler (gcc). I've made the resulting binary slightly bigger, but the build setup is much cleaner this way.
- I tested the Dockerfiles by building them locally (
docker buildx build --platform linux/amd64,linux/arm64 --file <dockerfile>) - I've adjusted the workflow to also build/push in forks, which led to proper MA images in our fork's GHCR. One test is currently failing (send to coveralls 500's), but I believe it's unrelated to my changes
- The tags for
-amd64/-arm64are gone, as the image contains both - Openshift's workflow/dockerfile requires qemu (the regular doesn't), because of the
RUN mkdirin that dockerfile - I've performed LCM on most of the used GH actions
- I had to patch the e2e, as it needs to use buildkit now.
I think I'm done now, it's ready for review
Anything else I can do, @maiqueb?
It is kind of annoying that this PR has partly been superseded by #329 and rebasing my PR requires a total rewrite now...
I'm willing to rebase/refresh the part that is still left (combine Dockerfile/Dockerfile.arm64 and eliminate QEMU by having go cross compile), but only if someone is actually going to take a look at it (@maiqueb or @dougbtv). Please let me know if this is the case.
I apologize for that.
I can take a look at it if you eliminate the QEMU dependency from this repo.
Thanks for the rebase, and apologies for the lack of coordination. Next time, feel free to join the Multus maintainer's call (info @ https://github.com/k8snetworkplumbingwg/community ) if you're relying on an update that isn't merged or isn't getting traction.