Commit Graph

3160 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
abe6321296 Merge pull request #87952 from mikedanese/opts
add *Options to Create, Update, and Patch in generated clientsets
2020-02-08 20:43:53 -08:00
Kubernetes Prow Robot
415b3ed950 Merge pull request #87944 from SataQiu/kubeadm-2020020802
kubeadm: remove 'kubeadm alpha kubelet config download'
2020-02-08 14:46:57 -08:00
Kubernetes Prow Robot
887ccc483c Merge pull request #87942 from SataQiu/kubeadm-2020020801
kubeadm: deprecate --kubelet-version command line option
2020-02-08 14:46:44 -08:00
Kubernetes Prow Robot
20dca67a8a Merge pull request #87453 from aojea/kubeadm_dual
kubeadm: dual-stack validation allow single stack
2020-02-08 14:46:06 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Kubernetes Prow Robot
334d788f08 Merge pull request #87299 from mikedanese/ctx
context in client-go
2020-02-08 06:43:52 -08:00
SataQiu
0714f814fe kubeadm: remove 'kubeadm alpha kubelet config download' 2020-02-08 14:52:33 +08:00
SataQiu
e167b44c17 kubeadm: deprecate --kubelet-version command line option 2020-02-08 12:56:25 +08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
RA489
ad9d2d71c0 remove bash examples/comments from the v1beta1 and v1beta2 APIs 2020-02-07 11:27:02 +05:30
Antonio Ojea
6dda7adaf5
kubeadm: dual-stack validation allow single stack
It turns out that the dual-stack feature enabled doesn't mean that
the cluster MUST be dual-stack, it only indicates that it MAY be
dual-stack but CAN be single-stack.

We should relax the validation to allow single-stack clusters
with dual-stack enabled.
2020-02-05 12:23:10 +01:00
Kubernetes Prow Robot
f81242916d
Merge pull request #81056 from neolit123/1.16-kubeadm-node-names
kubeadm: prevent bootstrap of nodes with known names
2020-02-01 03:35:20 -08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00
Elijah Oyekunle
07e3cca6d0 update existing import-restrictions files 2020-01-28 10:51:45 +01:00
Kubernetes Prow Robot
236eee1eba
Merge pull request #87505 from neolit123/1.18-handle-etcd-members-without-names
kubeadm: improvements to the concurrent etcd member join support
2020-01-26 08:51:02 -08:00
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
Lubomir I. Ivanov
a027c379f7 kubeadm: increase timeouts in the etcd client
- Extend the exponential backoff for add/remove/... retry to
11 steps ~=106 seconds. From experiments for 3 and more members
the race can take more that ~=26 seconds.
- Increase the dialTimeout for client creation to 40 seconds.
20 seconds seems racy for 3 and more members.
2020-01-25 00:48:05 +02:00
Lubomir I. Ivanov
5e0c0779a1 kubeadm: handle multiple members without names during concurrent join
For the etcd client, amend AddMember() to handle a very
rare bug when multiple members can end up with the same
name. Match the member peer address and assign it the name of
the member we are adding. For the rest of the members with missing
names use their member IDs as name. The etcd node is not disrupted
by the unknown names.

The important aspects are:
- The number of members of the initial cluster must match
the members in the cluster.
- The member we are current adding is present in the initial cluster.
2020-01-25 00:48:05 +02:00
Kubernetes Prow Robot
1249dd43ca
Merge pull request #86574 from SataQiu/deprecated-kube-dns
kubeadm: kube-dns is deprecated and will not be supported in a future version
2020-01-23 20:26:32 -08:00
Lubomir I. Ivanov
261f26075c kubeadm: remove the deprecated GA CoreDNS feature-gate
The CoreDNS GA feature-gate in kubeadm was deprecated since 1.13.
The k8s policy is to remove the gate 2 releases after it transitions
to GA:
https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecation

We kept it around for longer to prevent existing setups from breaking
as it caused minimal maintenance overhead.
2020-01-21 04:54:47 +02:00
Kubernetes Prow Robot
916edd922e
Merge pull request #86861 from SataQiu/fix-kubeadm-20200106
kubeadm upgrades always persist the etcd backup for stacked
2020-01-16 21:38:56 -08:00
Kubernetes Prow Robot
3e8155ead3
Merge pull request #86899 from SataQiu/enable-pull-retry-20200107
kubeadm: support automatic retry after failing to pull image
2020-01-13 13:58:41 -08:00
SataQiu
c7234aa177 kubeadm: support automatic retry after failing to pull image 2020-01-11 15:10:56 +08:00
Rostislav M. Georgiev
7f2d675ad0 kubeadm: Fix a false positive in a warning
The warning message

```
[config] WARNING: Ignored YAML document with GroupVersionKind ...
```

is printed for all GVKs that are not part of the kubeadm core types.
This is wrong as the component config types are supported and successfully
parsed and used despite the fact that the warning is printed for them too.

Hence this simple fix first checks if the group of the GVK is a supported
component config group and the warning is printed only if it's not.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-01-07 17:55:50 +02:00
SataQiu
72559ec693 kubeadm upgrades always persist the etcd backup for stacked 2020-01-06 12:34:28 +08:00
Kubernetes Prow Robot
3760d24674
Merge pull request #86493 from aojea/kubeadmAddress
kubeadm: use bind-address instead of address to configure the http probes
2020-01-03 19:13:40 -08:00
Antonio Ojea
c0bc36c12e kubeadm: probe address for unspecified ips
kubeadm deploys the apiserver, controller-manager and the scheduler
using liveness probes.
The bind-address option is used to configure the probe address, in
case this is configured with an unspecified address, the probe
will fail. When using an unspecified address the probe host field is
left empty, otherwise the bind-address is used.
2020-01-04 00:42:15 +01:00
Kubernetes Prow Robot
09cb73a554
Merge pull request #86705 from neolit123/1.18-fix-ca-whitespace-comparison
kubeadm: tolerate whitespace when validating user CA PEMs
2019-12-31 23:35:40 -08:00
Kubernetes Prow Robot
f772c9017c
Merge pull request #86609 from Pensu/kubeadm-ci-master
Fixing regex for kubernetes version in kubeadm
2019-12-30 14:29:39 -08:00
Lubomir I. Ivanov
453ac809c1 kubeadm: tolerate whitespace when validating user CA PEMs
The function validateKubeConfig() can end up comparing
a user generated kubeconfig to a kubeconfig generated by kubeadm.

If a user kubeconfig has a CA that is base64 encoded with whitespace,
if said kubeconfig is loaded using clientcmd.LoadFromFile()
the CertificateAuthorityData bytes will be decoded from base64
and placed in the v1.Config raw. On the other hand a kubeconfig
generated by kubeadm will have the ca.crt parsed to a Certificate
object with whitespace ignored in the PEM input.

Make sure that validateKubeConfig() tolerates whitespace differences
when comparing CertificateAuthorityData.
2019-12-30 22:16:41 +02:00
Peeyush Gupta
49884bca30 Fixing regex for kubernetes version in kubeadm 2019-12-30 21:12:24 +05:30
Kubernetes Prow Robot
33bba19372
Merge pull request #86553 from ajayktkp/kubeadm-1985
validation.go: don't clamp the CIDR size calculations
2019-12-28 16:27:38 -08:00
tanjunchen
b1e03256d7 alias kubeadmutil for k8s.io/kubernetes/cmd/kubeadm/app/util 2019-12-27 17:57:04 +08:00
Matthew Mix
013994a740 Updating minor grammar errors. 2019-12-26 13:48:19 -05:00
Ajay Kumar
7271a81921 validation.go: don't clamp the CIDR size calculations
removed not required import, updated build
2019-12-24 23:17:06 +05:30
Kubernetes Prow Robot
1ca0f89aa1
Merge pull request #86508 from kvaster/master
On OpenRC ServiceIsActive should not report true if no such service exists
2019-12-24 01:05:29 -08:00
SataQiu
803161d621 kubeadm: kube-dns is deprecated and will not be supported in a future version 2019-12-24 10:11:24 +08:00
kangsub song
237da6250b
change print log for unity when during kubeadm init
change print log for unity when during kubeadm init
2019-12-24 10:13:48 +09:00
SataQiu
107db83839 kubeadm: re-enable kubelet version check test in preflight 2019-12-22 16:49:39 +08:00
SataQiu
2497a1209b bump k8s.io/utils version 2019-12-21 14:54:44 +08:00
Antonio Ojea
7dc6c94395 kubeadm: use bind-address instead of address
kubeadm removed the deprecated "--address" flag for controller-manager
and scheduler in favor of "--bind-address"

We should use bind-address to configure the manifest probe addresses.
2019-12-20 22:03:49 +01:00
Viktor Kuzmin
947d696021 On OpenRC ServiceIsActive should not report true if no such service exists 2019-12-20 23:12:16 +03:00
Kubernetes Prow Robot
2796ff8538
Merge pull request #85279 from RainbowMango/pr_add_metrics_flag_to_proxy
Allow show hidden metrics in kube-proxy
2019-12-18 00:57:57 -08:00
RainbowMango
6b33a77068 Adopt kubeadm and kubeproxy unit test after new config field added.
Fix proxy unit test
2019-12-18 11:09:26 +08:00
Andrew Sy Kim
db2c048db9 support configuration of kube-proxy IPVS tcp,tcpfin,udp timeout
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-12-17 04:35:08 -05:00
Lubomir I. Ivanov
effe299082 kubeadm: add basic validation around kubelet.conf parsing
If the user has modified the kubelet.conf post TLS bootstrap
to become invalid, the function getNodeNameFromKubeletConfig() can
panic. This was observed to trigger in "kubeadm reset" use cases.

Add basic validation and unit tests around parsing the kubelet.conf
with the aforementioned function.
2019-12-12 17:30:53 +02:00
Kubernetes Prow Robot
7b792c38e0
Merge pull request #85837 from pickledrick/coredns-replicas
kubeadm: persist dns replica count on upgrade
2019-12-12 05:12:31 -08:00
Peter Grant
0e4469cddd persist deployed DNS configuration during kubeadm upgrade
Signed-off-by: Peter Grant <9246508+pickledrick@users.noreply.github.com>
2019-12-12 08:55:15 +11:00
Kubernetes Prow Robot
55f81314cc
Merge pull request #85032 from jfbai/move-fmt-out-of-api
refactor: move unwanted console output out of versiongetter API
2019-12-09 08:38:02 -08:00
Kubernetes Prow Robot
2fbe432d23
Merge pull request #85857 from hnanni/patch-1
Update checks.go
2019-12-08 09:41:08 -08:00