This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
ref(build): build all images with buildx #4402
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This change standardizes how all Docker images are built using
buildx
to enable multi-platform images. OSM control plane images will be built
for linux/amd64 and linux/arm64. Demo images will be built for
linux/amd64 and windows/amd64.
There are no user-facing breaking changes, but dev workflows to build
images are slightly different. The biggest changes are that Go binaries
are built inside Docker instead of the native environment, and the
docker-push-*
Makefile targets have been removed. See the dev guidechanges for more details.
For reviewers
This is a big PR, but the "entrypoint" is the Makefile, so that's where I would suggest looking first, then the changes to the Dockerfiles. Everything else is mostly collateral damage from those changes.
Testing done:
I tested the main CI workflow on my fork: https://github.com/nojnhuh/osm/actions/runs/1593840436
I also created a release on my fork to test the release process and artifacts. Images are pushed to my docker hub (nojnhuh) with the tag v0.0.0-multiarchtest.0. I did
osm install --set osm.image.registry=nojnhuh
and spun up a bookbuyer pod to test pulling/starting the init container and that worked for me.I have not tested the functionality of the windows/amd64 demo images or the linux/arm64 OSM images. If anyone has a cluster running with nodes that can run those, feedback would be appreciated.
Affected area:
Please answer the following questions with yes/no.
Does this change contain code from or inspired by another project? No
Is this a breaking change? Makefile targets to build images have been modified, but no user-facing breaking changes.