Closed luxas closed 6 years ago
fyi, we need to get cloud provider stuff out of api server too - see Issue https://github.com/kubernetes/kubernetes/issues/49402
As a first step, here's a deprecation for the cloud provider options : https://github.com/kubernetes/kubernetes/pull/53912
Bumping to v1.10
This is heavily dependent on the status of other libraries being factored properly.
/assign @liztio
It's up to 1218 now -- not sure the original ticket is still relevant, but I'm digging into this a bit. I'll update with findings.
$ go list -f '{{ join .Deps "\n" }}' "k8s.io/kubernetes/cmd/kubeadm" | wc -l
1218
Ugh, I thought I sent an update on this during kubecon, apparently I didn't. Go to the preflight checks code and remove
apiservoptions "k8s.io/kubernetes/cmd/kube-apiserver/app/options"
cmoptions "k8s.io/kubernetes/cmd/kube-controller-manager/app/options"
schedulerapp "k8s.io/kubernetes/cmd/kube-scheduler/app"
and most of the deps should go a way I think and hope. LMK what you find!
You're not wrong :) that dropped the dep count down to 774.
$ go list -f '{{ join .Deps "\n" }}' "k8s.io/kubernetes/cmd/kubeadm" | wc -l
774
That's way more reasonable :clap:. You should see a huge drop in binary size/build time as well. Let's ship the change you have locally :wink:!
Is there a PR for this?
@timothysc Yep. Linked above.
Somehow all the in-tree cloud provider packages are built into kubeadm; which is really bad. We should rip those out as kubeadm doesn't use them in any way.
Currently we have 985 linked packages, which is horrific
The main culprit is https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/options/plugins.go This file makes kubeadm depend on all clouds etc etc.
Removing the dep on the cloudproviders and the PVL controller reduces the dep number to 861
kubeadm links in the options package to validate the options in wait for componentconfig We might just remove that functionality or clean up the options package to not depend on cloud providers.
Also kubeadm now depens on
pkg/controller/service
although it shouldn't: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/constants/constants.go#L27Removing the linkage to the
options
packages reduces the dep number to 523. Yet removing the dep onpkg/controller/service
makes it 521.Compare:
With 521 dependencies kubeadm weighs 48 MB. Before the cut, the binary size was (is) 138 MB!!
We should discuss whether the preflight checks for control plane args is worth it or if we should cut 65% of the binary size now.
cc @andrewsykim @dims @timothysc