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

Support for multiarch images #324

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jonkerj
Copy link
Contributor

@jonkerj jonkerj commented Apr 18, 2023

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 jonkerj requested a review from dougbtv as a code owner April 18, 2023 08:33
@jonkerj jonkerj changed the title Support for multiarch images WIP: Support for multiarch images Apr 18, 2023
@jonkerj jonkerj force-pushed the improved-images branch 5 times, most recently from d51fafe to 03def7d Compare April 18, 2023 09:10
This commit alters the Dockerfile 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.

Fixes k8snetworkplumbingwg#226

Signed-off-by: Jorik Jonker <[email protected]>
This is needed to test/use the workflow in forks.

Signed-off-by: Jorik Jonker <[email protected]>
Some were giving warnings about deprecated features

Signed-off-by: Jorik Jonker <[email protected]>
Signed-off-by: Jorik Jonker <[email protected]>
@jonkerj jonkerj changed the title WIP: Support for multiarch images Support for multiarch images Apr 18, 2023
@jonkerj
Copy link
Contributor Author

jonkerj commented Apr 18, 2023

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

@jonkerj jonkerj mentioned this pull request Apr 18, 2023
@jonkerj
Copy link
Contributor Author

jonkerj commented May 1, 2023

Anything else I can do, @maiqueb?

@jonkerj
Copy link
Contributor Author

jonkerj commented May 25, 2023

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.

@maiqueb
Copy link
Collaborator

maiqueb commented May 25, 2023

I apologize for that.

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

@dougbtv
Copy link
Member

dougbtv commented May 26, 2023

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.

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.

arm64 docker image
3 participants