-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add multi platform support #444
Add multi platform support #444
Conversation
Hi @ashokpariya0. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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. |
@RamLavi Please take a look at this PR whenever you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashokpariya0 thanks for the refactor, it is now much more easier to review. Added some questions
/test pull-kubemacpool-e2e-k8s |
48f76fe
to
ac56357
Compare
/test all |
Hey @ashokpariya0, I'm seeing WARN lines when running the podman option:
Can we do something about these? |
build/Dockerfile
Outdated
COPY go.mod . | ||
COPY go.sum . | ||
RUN GO_VERSION=$(sed -En 's/^go +(.*)$/\1/p' go.mod) && \ | ||
wget https://dl.google.com/go/go${GO_VERSION}.${BUILDOS}-${BUILDARCH}.tar.gz && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the wget is giving off a long output that's not very helpful. Please consider adding the --quiet
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, Done.
@ashokpariya0 docker case is failing on my local:
[UPDATE]: installing the new docker-ce worked - thanks @oshoval ! |
Please install new one using https://docs.docker.com/engine/install/fedora/ |
yeah podman worked locally, I was just making sure both work. |
ac56357
to
1d654be
Compare
I think this is a non-critical warning intended to inform you that these build arguments are available and can be set explicitly. However, since default values are already provided in your Dockerfile, there is no need to worry if the defaults are acceptable. The warning can be safely ignored without affecting the build process. I can see BUILDOS and BUILDARCH correctly set by podman and docker on amd64,s390x build machine, so we are good here, |
These changes enable building kubemacpool container images for multiple platforms (amd64, s390x, arm64) from a single Dockerfile. Signed-off-by: Ashok Pariya [email protected]
@ashokpariya0 please rebase, I think I'm good otherwise |
Thanks @RamLavi I’m working on it. I’ve realigned my changes based on your updates in PR: #445. Currently testing a few scenarios for both local and non-local registries. I’ll raise a PR shortly. |
1d654be
to
5c7d35f
Compare
Done, Please check. |
/approve @oshoval feel free to lgtm when you're good with this |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RamLavi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Please consider to always mention podman first, i.e PR desc (twice), commits etc
# PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x | ||
# Alternatively, you can set the PLATFORMS variable using: | ||
# export PLATFORMS=linux/arm64,linux/s390x,linux/amd64 | ||
# or export PLATFORMS=all to automatically include all supported platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a PR that set platforms=all on the release right ? (unless there is already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oshoval I don't see any post-submit Prow jobs that handle the release for the macpool CNI image.
@RamLavi Could you please let me know how the image is being built and pushed to quay.io?
Also, please note that we need to set PLATFORMS=all before running make build to ensure the image is built with multi-platform support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github/ci/prow-deploy/files/jobs/k8snetworkplumbingwg/kubemacpool/kubemacpool-postsubmits.yaml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks! I found it here: kubemacpool-postsubmits.yaml.
I’ll go ahead and submit the PR for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, PR link: kubevirt/project-infra#3855
hack/build-multiarch-kubemacpool.sh
Outdated
OCI_BIN=$6 | ||
REGISTRY=$7 | ||
|
||
if [ "$OCI_BIN" == "docker" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please switch order, as we encourage to use podman all over
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think the order will make a difference here since we’re passing the OCI_BIN value from the Makefile, and the Makefile already takes care of it. You can see the relevant part of the Makefile here: link to Makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesnt make a difference of course, it is just semantic that podman is the preferable suggestion please
same as in the line you mentioned, and on readmes, podman is first
anyhow this is a nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
/test all |
These changes provide multi-platform build support for the Kubemacpool CNI, enabling builds for Docker and Podman container runtimes. Signed-off-by: Ashok Pariya [email protected]
5c7d35f
to
2c03979
Compare
Thanks /lgtm just please consider this nit |
/test all |
What this PR does / why we need it:
The upstream kubemacpool image (link) currently supports only the amd64 architecture. The proposed changes in this PR enable multi-platform support for the kubemacpool image, broadening its compatibility to include additional architectures.
Special notes for your reviewer:
Multiplatform Build Instruction: https://gist.github.com/ashokpariya0/33cf22401d17153b7f91b40295397ccd
Multi-platform build support is enabled for both Docker and Podman container runtimes, and the necessary changes have been made accordingly.
The PLATFORMS variable defines the target platforms for building the manager image, allowing support for multiple architectures.
To use this feature, you need to:
For Docker:
Have access to docker buildx. More information: [Docker Buildx Documentation](https://docs.docker.com/build/building/multi-platform/)
Ensure that BuildKit is enabled. More information: [Docker BuildKit Enhancements](https://docs.docker.com/develop/develop-images/build_enhancements/)
For Podman:
No additional dependencies are required to build multi-platform images. Podman supports this feature natively.
Release note: