Commit Graph

12 Commits

Author SHA1 Message Date
Lubomir I. Ivanov
ebfdb25c05 kubeadm: always use a short timeout for clientset creation
ToClientSet() in kubeconfig.go creates a clientset from
the passed Config object (kubeconfig). For IP addresses
that are not reachable e.g. Get() calls for ConfigMaps
can block for a few minutes with the default timeout.

Modify the timeout to a shorter value by passing an override.
2019-11-10 05:39:38 +02:00
Lubomir I. Ivanov
540c272f7b kubeadm: use EnsureCertificateAuthorityIsEmbedded() for file discovery
For file discovery, in case the user feeds a file for the CA
from the kubeconfig, make sure it's preloaded and embedded using
the new function EnsureCertificateAuthorityIsEmbedded().

This commit also applies cleanup:
- unroll validateKubeConfig() into ValidateConfigInfo() as this way
the default cluster can be re-used.
- in ValidateConfigInfo() reuse the variable config instead of creating
a new variable kubeconfig.
- make the Ensure* functions return descriptive errors instead of
wrapping the errors on the side of the callers.
2019-08-05 03:23:41 +03:00
fabriziopandini
df08af0349 feedback 1 2019-07-29 10:48:23 +02:00
fabriziopandini
d63e778f6f fix-file-discovery 2019-07-27 19:19:29 +02:00
Yago Nobre
cc670e29a1
Fix typos on cmd/kubeadm/app/cmd 2018-10-31 16:32:02 -03:00
yuexiao-wang
f15410692e [kubeadm/app/util]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-26 15:17:21 +08:00
Christoph Blecker
97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Di Xu
997a612206 kubeadm join the cluster with pre-existing client certificate 2018-07-26 19:34:09 +08:00
Serguei Bezverkhi
42bd500134 kubeadm golint clean up
Closes #375
2017-09-23 08:07:55 -04:00
fabriziopandini
f9f91bf18e fully implement kubeadm-phase-kubeconfig 2017-08-05 16:44:39 +02:00
Lucas Käldström
61a284d720
Hook up kubeadm against the BootstrapSigner/BootstrapTokenAuthenticator 2017-03-04 11:17:52 +02:00
Lucas Käldström
60b789b1c7
kubeadm: Move {admin,kubelet}.conf out as constants and make a separate util package for kubeconfig logic 2017-02-17 21:36:58 +02:00