whereabouts icon indicating copy to clipboard operation
whereabouts copied to clipboard

Support for multiarch images

Open jonkerj opened this issue 2 years ago • 5 comments

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):

  1. 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.
  2. I tested the Dockerfiles by building them locally (docker buildx build --platform linux/amd64,linux/arm64 --file <dockerfile>)
  3. 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
  4. The tags for -amd64/-arm64 are gone, as the image contains both
  5. Openshift's workflow/dockerfile requires qemu (the regular doesn't), because of the RUN mkdir in that dockerfile
  6. I've performed LCM on most of the used GH actions
  7. I had to patch the e2e, as it needs to use buildkit now.

jonkerj avatar Apr 18 '23 08:04 jonkerj

I think I'm done now, it's ready for review

jonkerj avatar Apr 18 '23 10:04 jonkerj

Anything else I can do, @maiqueb?

jonkerj avatar May 01 '23 11:05 jonkerj

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.

jonkerj avatar May 25 '23 14:05 jonkerj

I apologize for that.

I can take a look at it if you eliminate the QEMU dependency from this repo.

maiqueb avatar May 25 '23 14:05 maiqueb

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.

dougbtv avatar May 26 '23 14:05 dougbtv