Skip to content
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
merged 3 commits into from
Jan 6, 2022
Merged

ref(build): build all images with buildx #4402

merged 3 commits into from
Jan 6, 2022

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Dec 17, 2021

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 guide
changes 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:

Functional Area
New Functionality [ ]
CI System [X]
CLI Tool [ ]
Certificate Management [ ]
Control Plane [ ]
Demo [X]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [ ]
Upgrade [ ]
Other [ ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? No

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? Makefile targets to build images have been modified, but no user-facing breaking changes.

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 guide
changes for more details.

Signed-off-by: Jon Huhn <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2021

Codecov Report

Merging #4402 (67a5e16) into main (89b5661) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4402   +/-   ##
=======================================
  Coverage   69.21%   69.21%           
=======================================
  Files         212      212           
  Lines       14580    14580           
=======================================
  Hits        10092    10092           
  Misses       4436     4436           
  Partials       52       52           
Flag Coverage Δ
unittests 69.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89b5661...67a5e16. Read the comment docs.

# Conflicts:
#	.github/workflows/main.yml
#	.github/workflows/nightly-images.yml
#	.github/workflows/pre-release.yml
@nojnhuh nojnhuh linked an issue Jan 6, 2022 that may be closed by this pull request
@nojnhuh nojnhuh merged commit 54376b6 into openservicemesh:main Jan 6, 2022
@nojnhuh nojnhuh deleted the arm64 branch January 6, 2022 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for linux/arm64
4 participants