-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 support for CPU variants #1676
Add support for CPU variants #1676
Conversation
Signed-off-by: Silvano Cirujano Cuesta <[email protected]> Inspired-by: mickkael [email protected]
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I had tried the same, but with the build included, which fails because of the OCI limitation. remote only is a good compromise for now. Else qemu is likely a solution for armv6, but armv5's support is limited. (https://hub.docker.com/r/tonistiigi/binfmt) |
As mentioned in this issue comment, I mostly focus on the base image (sub)issue, because it's the one we're stumbling upon now. In fact I'd propose to split #1591 in two:
I consider that either a subset of your patch or mine should fix #1591 (after the split).
I don't see in the link provided by you any information about qemu-user having issues with ARMv5. An issue with Qemu v5 is being reported, but it doesn't have anything to do with ARMv5. Although don't see ARMv5 reported as supported in that repo, but "binfmt_misc" doesn't require it for working (in fact using a container to configure the host can trigger ugly race conditions that have costed us hours, I would discourage from doing so on systems that need to use |
To install qemu at built time, I use the image tonistiigi/binfmt , this is also the default in the github action set-qemu, so it's widely used. |
Kaniko shouldn't be anyway concerned about how the user gets the needed host support to build the image. It should only support getting the right base image. The Docker Hub official Debian image is available for ARMv5 and ARMv7 and they rely on completely different packages (being "armel" and "armhf" the respective names). If Kaniko isn't capable of getting the right one, then no matter how much I do on my host, it won't work. QEMU is capable of handling both ARMv5 and ARMv7 (I haven't tested if the resulting artifacts also run properly on real hardware though), therefore I still see the limitation on Kaniko not pulling the right base image. And that's what I'd like first to overcome. |
@googlebot I signed it! |
@mickkael the build pipeline fails due to some credential issues that I don't know how to fix, could you help me on that? |
all the other PR are failing the same test... it isn't your code causing the issue. |
So what does it mean for this PR? It will be reviewed somewhere in time? I shouldn't expect any merging until those CI issues are resolved? |
Sorry folks, due to some internal project organization, tests accessing a particular image are failing. |
@tejal29 do you have any plans to do a release in the upcoming future? Just to estimate when this patch will flow into a release. Thanks |
Signed-off-by: Silvano Cirujano Cuesta [email protected]
Inspired-by: mickkael [email protected]
Fixes #1591
Description
Adds the option to build an image with a CPU variant for the customplatform option. Look for
variant
here for the meaning of CPU variant: https://github.com/opencontainers/image-spec/blob/master/image-index.md#image-index-property-descriptions.The CPU variant specification cannot be included in the resulting image due to a limitation of the OCI-image specification. The effect of this PR is that in the case of multi-arch base images the right architecture and CPU variant gets used.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.