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 creating multi-arch images #125

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nunnatsa
Copy link

@nunnatsa nunnatsa commented Mar 5, 2025

What this PR does / why we need it:
This PR modifies the Dockerfiles and some other scripts, to allow creating multi-arch docker images.

It also added the new push-multi-arch make target, to create and push all the images as multi-arch manifests, for:

  • linux/amd64
  • linux/arm64
  • linux/s390x

This new make target can replace the existing push in two place in https://github.com/kubevirt/project-infra/blob/14a04add9bc136d08d07d80a31233a8f47f3e60b/github/ci/prow-deploy/files/jobs/kubevirt/application-aware-quota/application-aware-quota-postsubmits.yaml

Release note:

Support creating multi-arch images

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Mar 5, 2025
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign vladikr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

nunnatsa added 3 commits March 5, 2025 14:23
Remove the verbose build to reduce output lines
Print the build platform
drop the redundent chmod command. go build creates runnable binaries.

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
Allow building multi-arch images. The user can now use the `--platform`
command line parameter, to build different platform.

The builder image runs on the local machine platform, to acheive better
performance, But the final image is build according to the user request.

Bump go to 1.23

The final image does not need go. replace it's base image to plain
alpine, instead of golang alpine.

re-order the Dockerfile commands to get better caching, and fewer new
layers when storing the image in the registry.

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
Also, add the `push-multi-arch` make target to run the script.

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
@nunnatsa nunnatsa force-pushed the multi-arch-images branch from 4156400 to 6646f34 Compare March 5, 2025 12:24
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Mar 5, 2025
@nunnatsa nunnatsa force-pushed the multi-arch-images branch 2 times, most recently from c927745 to 4e33703 Compare March 5, 2025 14:44
Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
@nunnatsa nunnatsa force-pushed the multi-arch-images branch from 4e33703 to 3771faa Compare March 5, 2025 15:11
@kubevirt-bot
Copy link
Contributor

@nunnatsa: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-aaq-functest 3771faa link true /test pull-aaq-functest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants