Skip to content

✨ Disable DWARF and symbol table to decrease binary/image size#12856

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
Nordix:Sunnatillo/decrease-image-size
Mar 10, 2026
Merged

✨ Disable DWARF and symbol table to decrease binary/image size#12856
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
Nordix:Sunnatillo/decrease-image-size

Conversation

@Sunnatillo
Copy link
Copy Markdown
Contributor

@Sunnatillo Sunnatillo commented Oct 14, 2025

What this PR does / why we need it:
This PR removes DWARF and symbol table from binaries by default and introduces an option including them by setting DBG=1 .

Current images

kubeadm-control-plane-controller-amd64   97.4MB
kubeadm-bootstrap-controller-amd64      88.9MB
cluster-api-controller-amd64   		95.2MB

After removing DWARF and symbol table

kubeadm-control-plane-controller-amd64   67.7MB
kubeadm-bootstrap-controller-amd64      61.9MB
cluster-api-controller-amd64            66.3MB

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
#12855

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Oct 14, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 14, 2025
@Sunnatillo Sunnatillo force-pushed the Sunnatillo/decrease-image-size branch 2 times, most recently from e8d6c73 to 4fbbc69 Compare October 14, 2025 11:53
Comment thread hack/version.sh
@Sunnatillo
Copy link
Copy Markdown
Contributor Author

/area misc

@k8s-ci-robot k8s-ci-robot added area/misc Issues or PRs not related to any other area and removed do-not-merge/needs-area PR is missing an area label labels Oct 30, 2025
@sbueringer
Copy link
Copy Markdown
Member

Thx for the PR. I want to do some due diligence before merging it. Just probably won't find time to do it any time soon

@Sunnatillo
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@Sunnatillo
Copy link
Copy Markdown
Contributor Author

/retest

@Sunnatillo
Copy link
Copy Markdown
Contributor Author

@sbueringer Please take a look when you have time.

@sbueringer
Copy link
Copy Markdown
Member

Yup, will do!

Comment thread Makefile Outdated
Comment thread hack/version.sh Outdated
Comment thread hack/version.sh
Comment thread Makefile
@sbueringer
Copy link
Copy Markdown
Member

Please also rebase onto latest main

@Sunnatillo Sunnatillo force-pushed the Sunnatillo/decrease-image-size branch from 4fbbc69 to 2730043 Compare March 9, 2026 10:14
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 9, 2026
@Sunnatillo Sunnatillo force-pushed the Sunnatillo/decrease-image-size branch from 2730043 to 4dd5860 Compare March 9, 2026 10:26
@sbueringer sbueringer added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Mar 10, 2026
@sbueringer
Copy link
Copy Markdown
Member

Thank you very much, especially for the patience! Sorry for the delay

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 8b722169a8af4a1fd50197b70087e4ebe997f62e

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2026
@sbueringer
Copy link
Copy Markdown
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 10, 2026
Comment thread scripts/ci-build.sh Outdated
@sbueringer sbueringer removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 10, 2026
@Sunnatillo Sunnatillo force-pushed the Sunnatillo/decrease-image-size branch from 4dd5860 to c664837 Compare March 10, 2026 10:34
This commit introduces DBG variable which is used to control
including DWARF and symbol table for images/binaries
Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
@Sunnatillo Sunnatillo force-pushed the Sunnatillo/decrease-image-size branch from c664837 to a785807 Compare March 10, 2026 10:48
@sbueringer
Copy link
Copy Markdown
Member

Thx again!

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 10, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 44bbfc889f1e98450e524a1b129ee3947353a640

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit dc00d00 into kubernetes-sigs:main Mar 10, 2026
17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/misc Issues or PRs not related to any other area cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants