Skip to content

Removing symbol table and DRAWF debugging info from release images and binaries #12855

@Sunnatillo

Description

@Sunnatillo

What would you like to be added (User Story)?

We can remove symbol table and DRAWF debegging info from release images and binaries to significantly reduce the size of the images.
Kubernetes does the same for release images: https://github.com/kubernetes/kubernetes/blob/9b9cd768a05782b6cfeef62bec7696b441d7ad93/build/root/Makefile#L89

Detailed Description

ldflags="$(LDFLAGS) -w -s"

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

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions