Commit Graph

19 Commits

Author SHA1 Message Date
SataQiu
218b4dea9f kubeadm: print warnings to stderr 2022-01-11 23:08:59 +08:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
XinYang
72fd01095d
re-order imports for kubeadm
Signed-off-by: XinYang <xinydev@gmail.com>
2021-08-17 22:40:46 +08:00
XinYang
c2a8cd359f
re-order the imports in kubeadm
Signed-off-by: XinYang <xinydev@gmail.com>

Update cmd/kubeadm/app/cmd/join.go

Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2021-07-04 16:41:27 +08:00
Lubomir I. Ivanov
d9441906c4 kubeadm: make the scheduler and KCM connect to local endpoint
Pinning the kube-controller-manager and kube-scheduler kubeconfig files
to point to the control-plane-endpoint can be problematic during
immutable upgrades if one of these components ends up contacting an N-1
kube-apiserver:
https://kubernetes.io/docs/setup/release/version-skew-policy/#kube-controller-manager-kube-scheduler-and-cloud-controller-manager
For example, the components can send a request for a non-existing API
version.

Instead of using the CPE for these components, use the LocalAPIEndpoint.
This guarantees that the components would talk to the local
kube-apiserver, which should be the same version, unless the user
explicitly patched manifests.
2020-09-01 19:38:28 +03:00
Jie Shen
363bb39142
Use utils.net to parse ports instead of atoi (#89120) 2020-04-21 20:55:52 -07:00
vanduc95
57d04cafee kubeadm cleanup: master -> control-plane (cont.3) 2019-02-23 10:19:26 +07:00
Rostislav M. Georgiev
80e2a3cf07 kubeadm: reduce the usage of InitConfiguration
For historical reasons InitConfiguration is used almost everywhere in kubeadm
as a carrier of various configuration components such as ClusterConfiguration,
local API server endpoint, node registration settings, etc.

Since v1alpha2, InitConfiguration is meant to be used solely as a way to supply
the kubeadm init configuration from a config file. Its usage outside of this
context is caused by technical dept, it's clunky and requires hacks to fetch a
working InitConfiguration from the cluster (as it's not stored in the config
map in its entirety).

This change is a small step towards removing all unnecessary usages of
InitConfiguration. It reduces its usage by replacing it in some places with
some of the following:

- ClusterConfiguration only.
- APIEndpoint (as local API server endpoint).
- NodeRegistrationOptions only.
- Some combinations of the above types, or if single fields from them are used,
  only those field.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-28 12:21:01 +02:00
Ed Bartosh
bab556f7a6 kubeadm: improve hostport parsing error messages
Added hostport and host/port parts to the error messages
produced by ParseHostPort API.

This should help users to better identify parsing issues.

Fixes: kubernetes/kubeadm#1159
2018-11-20 13:21:36 +02:00
Lucas Käldström
731bcdc864
kubeadm: InitConfiguration.APIEndpoint -> LocalAPIEndpoint 2018-11-09 14:47:21 +02:00
yuexiao-wang
cc303c8774 [kubeadm/app/]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:24 +08:00
fabriziopandini
3f70af3685 upload and fetch of kubeam config v1alpha3 from cluster 2018-09-04 09:09:55 +02:00
fabriziopandini
7dfb3c7134 kubeadm config add support for more than one APIEndpoint 2018-08-27 09:00:26 +02:00
fabriziopandini
5e21c14b76 kubeadm config move ControlPlaneEndpoint to ClusterConfiguration 2018-08-24 09:42:23 +02:00
fabriziopandini
8abc54d257 make API.ControlPlaneEndpoint accept IP 2018-04-23 00:16:13 +02:00
xiangpengzhao
579602bba2 Refactor kubeadm api validation. 2018-04-18 10:26:02 +08:00
Joseph Wright
f558359315 Add ability to specify port for kubeadm API.ControlPlaneEndpoint
When `API.ControlPlaneEndpoint` is used, the `BindPort` of the
apiserver is currently assumed, which means a load balancer cannot
listen on a different port than the apiserver. This extends the
`ControlPlaneEndpoint` to take an optional port which may differ
from the apiserver's `BindPort`.
2018-04-13 16:46:12 -04:00
Steve Sloka
2fd29a0406 Add configuration item to allow kubeadm join to use a dns name pointing to control plane 2018-02-15 12:03:32 -05:00
Daneyon Hansen
3390bc3cbc Updates Kubeadm Master Endpoint for IPv6
Previously, kubeadm would use <ip>:<port> to construct a master
endpoint. This works fine for IPv4 addresses, but not for IPv6.
IPv6 requires the ip to be encased in brackets when being joined
to a port with a colon.

This patch updates kubeadm to support wrapping a v6 address with
[] to form the master endpoint url. Since this functionality is
needed in multiple areas, a dedicated util function was created.

Fixes: https://github.com/kubernetes/kubernetes/issues/48227
2017-08-17 10:57:54 -07:00