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

Build multiplatform images when issue make release-images #97459

Merged
merged 1 commit into from Jan 15, 2021

Conversation

yu2003w
Copy link
Contributor

@yu2003w yu2003w commented Dec 22, 2020

Signed-off-by: jared yu2003w@hotmail.com

What type of PR is this?
/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #97458

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 22, 2020
@k8s-ci-robot
Copy link
Contributor

@yu2003w: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 22, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @yu2003w!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @yu2003w. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 22, 2020
@fejta
Copy link
Contributor

fejta commented Dec 22, 2020

I am not convinced we should always use this pattern

@yu2003w
Copy link
Contributor Author

yu2003w commented Dec 23, 2020

Hi @fejta ,
Do you think the change is not necessary?
Or do I only need to run DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build for non-x86 platforms?
I found that pause image also use the same pattern.
Thanks for your comments.

@fejta
Copy link
Contributor

fejta commented Dec 23, 2020

/ok-to-test

I am primarily concerned about the effect of changing from docker build to docker buildx and would ideally like to maintain the current way of building: at least by default, at least for amd64.

AKA I would like people to be able to opt-into and then opt-out of this change and not just sending it to everyone immediately.

Alternatively I guess you can try and explain me why I shouldn't worry about this change on amd64 :)

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 23, 2020
@fejta
Copy link
Contributor

fejta commented Dec 23, 2020

Also are you familiar with make cross?

@yu2003w yu2003w changed the title Build multiplatform images when issue make release-images [WIP]Build multiplatform images when issue make release-images Dec 28, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 28, 2020
@ehashman
Copy link
Member

/sig release

@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 14, 2021
@yu2003w yu2003w changed the title [WIP]Build multiplatform images when issue make release-images Build multiplatform images when issue make release-images Jan 14, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2021
@yu2003w
Copy link
Contributor Author

yu2003w commented Jan 14, 2021

Hi @fejta ,
Per my understanding, make cross only compiled binaries for different platforms.
This fix is to build images for different platforms.
I updated PR to run docker buildx buid for linux/ppc64le and linux/s390x. This change will not impact other platforms.

Signed-off-by: jared <yu2003w@hotmail.com>
Copy link
Contributor

@fejta fejta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fejta, yu2003w

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit 5932f34 into kubernetes:master Jan 15, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Jan 15, 2021
@@ -383,7 +383,11 @@ EOF
echo "COPY nsswitch.conf /etc/" >> "${docker_file_path}"
fi

"${DOCKER[@]}" build ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
if [[ "${arch}" == "linux/s390x" || "${arch}" == "linux/ppc64le" ]]; then
DOCKER_CLI_EXPERIMENTAL=enabled "${DOCKER[@]}" buildx build --platform linux/"${arch}" --load ${docker_build_opts:+"${docker_build_opts}"} -q -t "${docker_image_tag}" "${docker_build_path}" >/dev/null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why aren't we using buildx on all paltforms?
cc @dims @justaugustus @vinayakankugoyal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems #97458 was also only solved for the specific list of platforms in the issue?

@BenTheElder
Copy link
Member

make cross builds for all platforms.

Currently if you want a multi-arch image for less platforms, you build for the N platforms (in separate invocations) and assemble your own manifest image. That should work.

It makes sense to support building for a subset of platforms into a manifest image directly, but I don't think that should special-case two platforms.

@BenTheElder BenTheElder mentioned this pull request Feb 9, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'make release-images' doesn't build ppc64le/s390x images
5 participants