-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
images/alpine: Build for arm64 #22444
Conversation
Hi @LorbusChris. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
/cc @BenTheElder |
looking at the file history, @fejta might be best suited for a review of these changes. |
/cc EDIT: yeah, it fails
|
54b097a
to
ef41cf0
Compare
ef41cf0
to
d7fd999
Compare
d7fd999
to
da68da2
Compare
da68da2
to
6bb3beb
Compare
2a13598
to
fd1b740
Compare
fd1b740
to
5754c18
Compare
#22599 has landed. This PR should be ready now. |
substitutions: | ||
_GIT_TAG: '12345' | ||
images: | ||
- 'gcr.io/$PROJECT_ID/alpine:$_GIT_TAG' |
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.
What is the reason for dropping these? (or rather moving pushing them into the build step)
https://cloud.google.com/build/docs/build-config#images
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.
This doesn't seem to work with manifest lists.
Using:
steps:
- name: gcr.io/k8s-testimages/gcb-docker-gcloud
entrypoint: /buildx-entrypoint
args:
- build
- --tag=gcr.io/$PROJECT_ID/alpine:$_GIT_TAG
- --tag=gcr.io/$PROJECT_ID/alpine:latest
- --platform=linux/amd64,linux/arm64/v8
- --build-arg=IMAGE_ARG=gcr.io/$PROJECT_ID/alpine:$_GIT_TAG
- .
dir: .
substitutions:
_GIT_TAG: '12345'
images:
- 'gcr.io/$PROJECT_ID/alpine:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/alpine:latest'
yields:
ERROR: failed to find one or more images after execution of build steps: ["gcr.io/k8s-staging-test-infra/alpine:v20210618-1bc5e9d8bf" "gcr.io/k8s-staging-test-infra/alpine:latest"]
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.
GCR specific but cheap and simple gcloud container images add-tag
.
To do it generically you'd need to push the manifest again as a tag (and only the manifest, the underlying resources should already be pushed), crane
can do this (and other super useful things!) see: crane tag
/hold |
This commit switches the builder base image used for building the alpine image to `gcr.io/k8s-testimages/gcb-docker-gcloud` in order to do multi-arch (amd64 and arm64) builds via `docker buildx build`, yielding a multi-arch manifest.
5754c18
to
fa7b629
Compare
Thanks @BenTheElder, let's go the easy way with |
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.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, LorbusChris 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 |
@BenTheElder it looks like this broke the postsubmit job https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/post-test-infra-push-alpine/1405964567472771072 |
This commit adds a Google Cloud Build definition for building alpine
arm64 images and pushing them as a manifest list together with their
amd64 counterparts.
This is a prereq for #16588 and #22362
Blocked on: #22599/cc @stevekuznetsov