kubernetes/cmd
Lubomir I. Ivanov b117a928a6 kubeadm: prevent bootstrap of nodes with known names
If a Node name in the cluster is already taken and this Node is Ready,
prevent TLS bootsrap on "kubeadm join" and exit early.

This change requires that a new ClusterRole is granted to the
"system:bootstrappers:kubeadm:default-node-token" group to be
able get Nodes in the cluster. The same group already has access
to obtain objects such as the KubeletConfiguration and kubeadm's
ClusterConfiguration.

The motivation of this change is to prevent undefined behavior
and the potential control-plane breakdown if such a cluster
is racing to have two nodes with the same name for long periods
of time.

The following values are validated in the following precedence
from lower to higher:
- actual hostname
- NodeRegistration.Name (or "--node-name") from JoinConfiguration
- "--hostname-override" passed via kubeletExtraArgs

If the user decides to not let kubeadm know about a custom node name
and to instead override the hostname from a kubelet systemd unit file,
kubeadm will not be able to detect the problem.
2020-01-26 18:50:54 +02:00
..
clicheck Move pkg/kubectl/cmd/util and subdirs to staging 2019-07-29 13:08:41 -07:00
cloud-controller-manager Plumb configured acceptContentType to client config 2019-11-11 10:54:38 -05:00
controller-manager Add test cases for a helper function in controller manager 2019-12-17 12:31:53 +08:00
gendocs Create work-around wrappers for pure attribute on go_binary and go_test 2019-02-22 18:08:34 -08:00
genkubedocs Drop cloud-controller-manager artifacts from k/k release 2019-08-06 13:51:27 -04:00
genman Drop cloud-controller-manager artifacts from k/k release 2019-08-06 13:51:27 -04:00
genswaggertypedocs Clean up genswaggertypedocs. 2019-05-01 16:32:05 +00:00
genutils
genyaml Remove genyaml binary 2019-04-12 08:31:29 -04:00
importverifier delete all duplicate empty blanks 2019-02-23 10:28:04 +08:00
kube-apiserver Add flowcontrol to apiVersionPriorities 2020-01-19 14:16:46 -08:00
kube-controller-manager Merge pull request #85281 from RainbowMango/pr_add_metrics_flag_to_controller_manager 2020-01-15 21:20:34 -08:00
kube-proxy Creating new EndpointSliceProxying feature gate for kube-proxy 2020-01-17 16:17:40 -08:00
kube-scheduler Merge pull request #86709 from mwmix/scheduler_unit_tests 2020-01-16 13:14:31 -08:00
kubeadm kubeadm: prevent bootstrap of nodes with known names 2020-01-26 18:50:54 +02:00
kubectl remove pkg/version and some of redundant copies of it 2019-09-16 16:24:35 -07:00
kubelet Default the --enable-cadvisor-endpoints flag to disabled 2020-01-21 17:30:46 -05:00
kubemark fix kubemark use fake CRI 2020-01-07 11:39:58 +08:00
linkcheck fix staticcheck faulures in 'cmd' pkg 2019-12-16 18:32:54 +08:00
preferredimports fix staticcheck faulures in 'cmd' pkg 2019-12-16 18:32:54 +08:00
verifydependencies Close the file after reading in verifydependencies#main 2019-10-19 10:46:50 -07:00
BUILD Drop cmd/hyperkube 2019-11-06 09:11:35 -05:00
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00