Removing symbol table and DRAWF debugging info from release images and binaries
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.
I am not sure if this considered as a feature but I could not find other suitable label.
What is the size of the binaries/images with and without the flags? (just curious)
What is the size of the binaries/images with and without the flags? (just curious)
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
30 percent reduction in image size
Seems good to me. Please just link the place where k/k is doing it for reference
Seems good to me. Please just link the place where k/k is doing it for reference
Updated the with the link
/assign