kubernetes/cmd/kubeadm/app/util
Kubernetes Submit Queue cb1ef9f7e8
Merge pull request #64815 from dixudx/hostname_empty
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

error out empty hostname

**What this PR does / why we need it**:
For linux, the hostname is read from file `/proc/sys/kernel/hostname` directly, which can be overwritten with whitespaces.

Should error out such invalid hostnames.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubeadm#835

**Special notes for your reviewer**:
/cc luxas timothysc 

**Release note**:

```release-note
nodes: improve handling of erroneous host names
```
2018-08-03 17:13:32 -07:00
..
apiclient Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
audit Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
config nodes: improve handling of erroneous host names 2018-08-01 14:57:25 +08:00
dryrun Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
etcd Automated rename from MasterConfiguration to InitConfiguration 2018-07-09 04:55:02 +03:00
kubeconfig kubeadm join the cluster with pre-existing client certificate 2018-07-26 19:34:09 +08:00
pubkeypin Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
runtime kubeadm: fix runtime.ImageExists API 2018-07-31 13:50:12 +03:00
staticpod Automated rename from MasterConfiguration to InitConfiguration 2018-07-09 04:55:02 +03:00
system kernel_validator: amend kernel config check paths 2018-07-27 09:07:12 +03:00
arguments_test.go Sort arguments before joining them, for reproducible return string 2018-05-14 20:24:39 +02:00
arguments.go Sort arguments before joining them, for reproducible return string 2018-05-14 20:24:39 +02:00
BUILD move runtime details into ContainerRuntime 2018-07-16 12:20:04 +03:00
cgroupdriver_test.go kubeadm: conditionally set the kubelet cgroup driver for Docker 2018-05-30 20:29:21 +03:00
cgroupdriver.go kubeadm: conditionally set the kubelet cgroup driver for Docker 2018-05-30 20:29:21 +03:00
copy.go Adding etcd upgrade to kubeadm upgrade apply 2017-11-18 18:47:50 -05:00
endpoint_test.go make API.ControlPlaneEndpoint accept IP 2018-04-23 00:16:13 +02:00
endpoint.go make API.ControlPlaneEndpoint accept IP 2018-04-23 00:16:13 +02:00
error_test.go remove unused code in kubeadm error.go 2018-05-31 13:43:04 +08:00
error.go remove unused code in kubeadm error.go 2018-05-31 13:43:04 +08:00
marshal_test.go Handle errors 2018-07-17 20:47:14 +10:00
marshal.go Rename NodeConfiguration to JoinConfiguration in v1alpha3, but support both names for this release of kubeadm 2018-07-13 23:06:17 +02:00
template_test.go Switch to k8s.gcr.io vanity domain 2018-02-07 21:14:19 -08:00
template.go kubeadm golint clean up 2017-09-23 08:07:55 -04:00
version_test.go Improve where we load builds from for kubeadm upgrade jobs 2018-05-09 12:11:41 -04:00
version.go Add a timeout when fetching latest version 2018-07-09 07:24:38 -04:00