-
Notifications
You must be signed in to change notification settings - Fork 525
images: Use docker buildx for kube-cross images and consolidate go-based image Makefiles #1418
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
Conversation
/uncc please add me back when needed. |
Signed-off-by: Stephen Augustus <[email protected]>
Use go-runner Makefile pattern for multi-arch Signed-off-by: Stephen Augustus <[email protected]>
09ad7ba
to
7a03bdf
Compare
kube-cross single-arch |
Signed-off-by: Stephen Augustus <[email protected]>
Here we create a few "common" Makefiles for image building: - images/Makefile.common-image - images/build/Makefile.build-image Makefile.common-image takes the targets from the go-runner Makefile and makes them reusable for both go-runner and kube-cross. Makefile.build-image is intended to contain information specific to images that will be built in the k8s-staging-build-image GCP project. Right now, it only contains the target Google Container Registry. images/build/{go-runner,kube-cross}/Makefile now only contains variables specific to the image and includes the aforementioned "common" Makefiles via the 'include' directive. (This is borrowed from how k-sigs/kind handles their image building.) Signed-off-by: Stephen Augustus <[email protected]>
dbd845e
to
36c81b6
Compare
This seems like it might be causing build failures on s390x. Signed-off-by: Stephen Augustus <[email protected]>
Use make functions for string substitution instead of sed. Frankly, the sed was hard for me for comprehend. For amending manifests to the final manifest list, we were previously pushing images with the full platform name: e.g., "linux/amd64" (OS/architecture) instead of "amd64" (just arch) This commit properly strips the OS during manifest list creation. (The same issue was fixed for image tags in a previous commit.) Signed-off-by: Stephen Augustus <[email protected]>
683ea75
to
642d4ab
Compare
/hold cancel This is some cleanup work I'd like to land today ahead of building the go1.15.2 images (which are still building upstream). |
/hold need to land a k/test-infra PR first to update the kube-cross build dir. I'll get that up shortly. |
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
/hold for others to review if needed
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
/hold
for other folks to take a look
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
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: cpanato, hasheddan, justaugustus, saschagrunert, xmudrii 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 |
/hold cancel |
I don't see any of the non-amd64 archs, so wondering whether we really enabled the build for other architecture.
|
@mkumatag -- we haven't published multi-arch images for kube-cross yet. This was merely the next step in the process. There are some hardcoded |
What type of PR is this?
/kind feature cleanup
/area dependency
What this PR does / why we need it:
images: Update env to k8s-testimages/gcb-docker-gcloud:v20200824-5d057db
kube-cross: Enable building via docker buildx
Use go-runner Makefile pattern for multi-arch
images: Use shell for loops to "simplify" platform building/pushing
images: Standardize Makefiles for build images
Here we create a few "common" Makefiles for image building:
Makefile.common-image takes the targets from the go-runner Makefile and
makes them reusable for both go-runner and kube-cross.
Makefile.build-image is intended to contain information specific to
images that will be built in the k8s-staging-build-image GCP project.
Right now, it only contains the target Google Container Registry.
images/build/{go-runner,kube-cross}/Makefile now only contains variables
specific to the image and includes the aforementioned "common" Makefiles
via the 'include' directive.
(This is borrowed from how k-sigs/kind handles their image building.)
go-runner: Drop extraneous pre-build step in Dockerfile
This seems like it might be causing build failures on s390x.
images: Fix image manifests annotating 'os/arch' instead of 'arch'
Use make functions for string substitution instead of sed.
Frankly, the sed was hard for me for comprehend.
For amending manifests to the final manifest list, we were previously
pushing images with the full platform name:
e.g., "linux/amd64" (OS/architecture) instead of "amd64" (just arch)
This commit properly strips the OS during manifest list creation.
(The same issue was fixed for image tags in a previous commit.)
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Accompanying k/test-infra PR is here: kubernetes/test-infra#19176
Does this PR introduce a user-facing change?