Skip to content

Build multi-arch images for ARM64 and AMD64 at the same time #741

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

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

sarandia
Copy link
Contributor

We can use buildx, which is already set up in the Makefile, to
simultaneously build a multi-arch Docker image for this component for
ARM64 and AMD64, such that the image will work for both architectures.

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
We can publish an image that is multi-arch across X86 and ARM64.
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


We can use buildx, which is already set up in the Makefile, to
simultaneously build a multi-arch Docker image for this component for
ARM64 and AMD64, such that the image will work for both architectures.
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 13, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @sarandia!

It looks like this is your first PR to kubernetes-sigs/gcp-compute-persistent-disk-csi-driver 🎉. 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-sigs/gcp-compute-persistent-disk-csi-driver 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 @sarandia. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 13, 2021
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 13, 2021
@mattcary
Copy link
Contributor

/assign

@mattcary
Copy link
Contributor

/ok-to-test
/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 13, 2021
@mattcary
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 13, 2021
@sarandia
Copy link
Contributor Author

/retest

1 similar comment
@sarandia
Copy link
Contributor Author

/retest

@mattcary
Copy link
Contributor

I think you're running into #743. I'll have a fix out for that today.

@mattcary
Copy link
Contributor

#743 just fixed.

/retest

@saad-ali
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saad-ali, sarandia

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 15, 2021
@k8s-ci-robot k8s-ci-robot merged commit 404696a into kubernetes-sigs:master Apr 15, 2021
@jingxu97
Copy link
Contributor

This PR breaks the multi-arch build. Linux build with current Dockerfile does not work for amd 64, I think. Need to consider revert this PR until the issue is fixed.

https://storage.googleapis.com/kubernetes-jenkins/logs/ci-gce-pd-csi-driver-latest-k8s-master-windows-2004/1383518650501173248/build-log.txt

See errors

#25 41.10 Fetched 5318 kB in 0s (14.1 MB/s)
#25 41.20 Error while loading /usr/sbin/dpkg-split: No such file or directory
#25 41.21 Error while loading /usr/sbin/dpkg-deb: No such file or directory
#25 41.22 dpkg: error processing archive /var/cache/apt/archives/libuuid1_2.33.1-0.1_arm64.deb (--unpack):
#25 41.22  dpkg-deb --control subprocess returned error exit status 1
#25 41.25 Errors were encountered while processing:
#25 41.25  /var/cache/apt/archives/libuuid1_2.33.1-0.1_arm64.deb
#25 41.38 E: Sub-process /usr/bin/dpkg returned an error code (1)
#25 ERROR: executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c clean-install udev]: exit code: 100
------
 > [linux/arm64 base 2/2] RUN clean-install udev:
------
Dockerfile:22
--------------------
  20 |     # MAD HACKS: Build a version first so we can take the scsi_id bin and put it somewhere else in our real build
  21 |     FROM k8s.gcr.io/build-image/debian-base:v2.1.3 as base
  22 | >>> RUN clean-install udev
  23 |     
  24 |     # Start from Kubernetes Debian base
--------------------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c clean-install udev]: exit code: 100
make: *** [Makefile:83: build-and-push-container-linux] Error 1
make: Leaving directory '/home/prow/go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver'

@sarandia
Copy link
Contributor Author

@jingxu97 Thanks for pointing it out. We need to add one more line. I created #751 to fix this.

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants