Commit Graph

27 Commits

Author SHA1 Message Date
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Lubomir I. Ivanov
ce68a89d26 kubeadm: simplify discover/token and add detailed unit tests
- Add retrieveValidatedConfigInfo to be able to better unit
test the function.
- Break some of the logic in RetrieveValidatedConfigInfo into
helper functions.
- Pass JoinConfiguration.Discovery to RetrieveValidatedConfigInfo
instead of JoinConfiguration.
- Use the discovery timeout per API call to fetch cluster-info
(optionally the user value can be slit in 2).
- Add detailed unit tests for retrieveValidatedConfigInfo.
2019-11-27 01:16:43 +02:00
Chuck Ha
8fcf892498
Remove an infinite poll
This infinite poll can make kubeadm init/join hang forever due
to a lack of function cancelling.

Signed-off-by: Chuck Ha <chuckh@vmware.com>
2019-11-13 10:10:41 -05:00
Yassine TIJANI
d3620dfa29 move jws to k8s.io/cluster-bootstrap
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-25 13:48:13 +02:00
Dmitry Rozhkov
358659ef4d kubeadm: remove duplicated token.parsePEMCerts()
The function parsePEMCerts() duplicates ParseCertsPEM() from
the "k8s.io/client-go/util/cert" package.
2019-04-29 14:32:38 +03:00
Rostislav M. Georgiev
9e1ac76c1a kubeadm: Introduce v1beta2 config
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-04-25 17:10:04 +03:00
SataQiu
62dbd0fa0d use 'errors.Errorf' instead of 'fmt.Errorf' 2019-04-20 17:10:18 +08:00
Lubomir I. Ivanov
6f6b364b9c kubeadm: update output of init, join reset commands
- move most unrelated to phases output to klog.V(1)
- rename some prefixes for consistency - e.g.
[kubelet] -> [kubelet-start]
- control-plane-prepare: print details for each generated CP
component manifest.
- uppercase the info text for all "[reset].." lines
- modify the text for one line in reset
2019-03-06 03:17:35 +02:00
Rafael Fernández López
47b4e04842
kubeadm: Remove cluster name from JoinConfiguration 2018-11-08 23:29:52 +01:00
Rostislav M. Georgiev
a3e7d7e038 kubeadm: APIServerEndpoints -> APIServerEndpoint
In the past the discovery configuration expected, that we can support multiple
API server endpoints. In practice, we always end up with a single API server
endpoint, because, even in HA setups, we use a load balancer scheme for API
servers.
Therefore, to reduce complexity and improve readability of the config, the
multiple API server endpoints support is removed from the bootstrap token
discovery join method and configuration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-10-30 16:10:28 +02:00
yuexiao-wang
c0a9b4d04d add BUILD
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:52 +08:00
Yu Liao
fc21115c3f Moved staging/src/k8s.io/client-go/tools/bootstrap to staging/src/k8s.io/cluster-bootstrap 2018-10-02 09:46:13 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Lucas Käldström
67a9f1bfe7
autogenerated 2018-05-31 22:21:06 +03:00
Rostislav M. Georgiev
230a9c67ce kubeadm: Introduce controllable timeout on join
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-04-03 14:05:02 +03:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Gavin
f653d02b05 create auto-gen files 2018-01-17 16:23:03 +08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Matt Moyer
1be639d6b0 kubeadm: implement TLS discovery root CA pinning.
This change adds the `--discovery-token-ca-cert-hash` and `--discovery-token-unsafe-skip-ca-verification` flags for `kubeadm join` and corresponding fields on the kubeadm NodeConfiguration struct. These flags configure enhanced TLS validation for token-based discovery.

The enhanced TLS validation works by pinning the public key hashes of the cluster CA. This is done by connecting to the `cluster-info` endpoint initially using an unvalidated/unsafe TLS connection. After the cluster info has been loaded, parsed, and validated with the existing symmetric signature/MAC scheme, the root CA is validated against the pinned public key set. A second request is made using validated/safe TLS using the newly-known CA and the result is validated to make sure the same `cluster-info` was returned from both requests.

This validation prevents a class of attacks where a leaked bootstrap token (such as from a compromised worker node) allows an attacker to impersonate the API server.

This change also update `kubeadm init` to print the correct `--discovery-token-ca-cert-hash` flag in the example `kubeadm join` command it prints at the end of initialization.
2017-08-10 11:39:25 -05:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Lucas Käldström
61a284d720
Hook up kubeadm against the BootstrapSigner/BootstrapTokenAuthenticator 2017-03-04 11:17:52 +02:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese
690c7e578b kubeadm: refactor discovery behind an interface 2016-12-15 13:54:49 -08:00