-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Faster K3s Binary Build Option #7805
Conversation
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
@@ -5,3 +5,4 @@ | |||
./.cache | |||
./.dapper | |||
./.trash-cache | |||
./.git/objects/pack |
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 folder contains the bulk of the .git
~1.6GB size, but is not needed to extract the commit ID or branch when calling git status
or other git info commands. Ignoring this folder enables a much lower copy of only some 40KB to docker containers and still allows use of the scripts/version.sh
.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #7805 +/- ##
==========================================
+ Coverage 47.18% 51.55% +4.36%
==========================================
Files 143 143
Lines 14509 14509
==========================================
+ Hits 6846 7480 +634
+ Misses 6573 5845 -728
- Partials 1090 1184 +94
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Proposed Changes
This is an attempt to make a multi-stage dockerfile that focuses on the minimal build required to produces a functional k3s binary. The use case is when developer must build k3s over and over again when developing small code changes. Images and rpm packaging is often unnecessary when all you need to do is run
./dist/artifacts/k3s server -t 12345
Speedup is achieved from the following:
ci
into its components on Docker build to maximize intermediate image cachinggo build
callsThis is not intended as a replacement for any of the CI build process at this time.
Types of Changes
Local Build
Verification
Run
make local
to use the new build optionTesting
AMD Ryzen 7 5800H
pkg/etc/etcdproxy.go
, rename functionETCDServerURL
toETCDServerURL1
, simulating a code changeSKIP_VALIDATE=true SKIP_AIRGAP=true make
the current fastest way to produce a k3s binaryLinked Issues
User-Facing Change
Further Comments