-
Notifications
You must be signed in to change notification settings - Fork 435
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
Build manager on the host #2289
Conversation
c895491
to
ffadd08
Compare
ffadd08
to
0df10e6
Compare
@@ -86,19 +101,5 @@ jobs: | |||
push: ${{ github.event_name != 'pull_request' }} | |||
tags: ${{ steps.docker_meta.outputs.tags }} | |||
labels: ${{ steps.docker_meta.outputs.labels }} | |||
build-args: | |
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.
why do we not need these args anymore?
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.
They're set while building the binary, straight from the environment. They're not needed for anything else.
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.
I think this LGTM, but we should wait on @pavolloffay 's review here too
d1d6705
to
4e61c5a
Compare
Instead of building the manager binary during the docker image build, instead build it on the host and copy it to the image. This massively improves the performance of cross compilation, which is much faster natively vs emulation via QEMU.
This way we can cache based on the state of go.sum.
4e61c5a
to
c334692
Compare
* Build manager on the host Instead of building the manager binary during the docker image build, instead build it on the host and copy it to the image. This massively improves the performance of cross compilation, which is much faster natively vs emulation via QEMU. * Setup Go after checking our code in E2E tests This way we can cache based on the state of go.sum. * Minor improvements
Description:
Cross-compile the manager binary on the host and copy the appropriate binary into the container during the build. This makes image building much faster, as we don't need to rely on emulation via QEMU.
I've also removed our local toolchain's dependency on buildx while I was at it, as it's not strictly necessary.
Looks like we could build the binaries in a matrix job, but given that they take around 15 minutes without cache, I don't think it's worth it to mess around with artifacts.
Issue: #2295
Testing:
Temporarily made the build happen for this PR, and it worked fine.