Commit Graph

8991 Commits

Author SHA1 Message Date
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
Kubernetes Prow Robot
5ced53c0c4
Merge pull request #87628 from alculquicondor/cc-v1alpha2
Add kubescheduler.config.k8s.io/v1alpha2
2020-01-30 16:59:33 -08:00
Aldo Culquicondor
3d83ef2e8e Autogenerated and build files for kubescheduler.config.k8s.io/v1alpha2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-29 17:18:48 -05:00
Aldo Culquicondor
11c4bcd9dd Copy kubescheduler.config.k8s.io/v1alpha1 files onto v1alpha2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-29 17:18:41 -05: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
789dc873f6
Merge pull request #87440 from dims/switch-enable-cadvisor-json-endpoints-flag-to-false
Default the --enable-cadvisor-endpoints flag to disabled
2020-01-24 12:18:45 -08: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
Davanum Srinivas
bb587690fd
Default the --enable-cadvisor-endpoints flag to disabled
As part of #68522, Switching off the cAdvisor v1 Json API that we expose
directly. These include /stats/, /stats/container, /stats/{podName}/{containerName},
and /stats/{namespace}/{podName}/{uid}/{containerName}
2020-01-21 17:30:46 -05: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
08dd4f5478
Merge pull request #87357 from yutedz/apisvr-flow-cntl
Add flowcontrol to apiVersionPriorities
2020-01-19 17:07:36 -08:00
Ted Yu
34f0767137 Add flowcontrol to apiVersionPriorities 2020-01-19 14:16:46 -08:00
Rob Scott
47b2593d59
Creating new EndpointSliceProxying feature gate for kube-proxy
This creates a new EndpointSliceProxying feature gate to cover EndpointSlice
consumption (kube-proxy) and allow the existing EndpointSlice feature gate to
focus on EndpointSlice production only. Along with that addition, this enables
the EndpointSlice feature gate by default, now only affecting the controller.

The rationale here is that it's really difficult to guarantee all EndpointSlices
are created in a cluster upgrade process before kube-proxy attempts to consume
them. Although masters are generally upgraded before nodes, and in most cases,
the controller would have enough time to create EndpointSlices before a new node
with kube-proxy spun up, there are plenty of edge cases where that might not be
the case. The primary limitation on EndpointSlice creation is the API rate limit
of 20QPS. In clusters with a lot of endpoints and/or with a lot of other API
requests, it could be difficult to create all the EndpointSlices before a new
node with kube-proxy targeting EndpointSlices spun up.

Separating this into 2 feature gates allows for a more gradual rollout with the
EndpointSlice controller being enabled by default in 1.18, and EndpointSlices
for kube-proxy being enabled by default in the next release.
2020-01-17 16:17:40 -08: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
719b8aa5f3
Merge pull request #86709 from mwmix/scheduler_unit_tests
Adding unit tests for kube-scheduler Config Complete() method.
2020-01-16 13:14:31 -08:00
Kubernetes Prow Robot
d9bf22f8f7
Merge pull request #85281 from RainbowMango/pr_add_metrics_flag_to_controller_manager
Allow show hidden metrics in kube-controller-manager
2020-01-15 21:20:34 -08:00
Kubernetes Prow Robot
61d36e4a43
Merge pull request #85850 from danwinship/kubelet-ipv6-node-ip
Allow "kubelet --node-ip ::" to mean prefer IPv6
2020-01-13 17:41:08 -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
Kubernetes Prow Robot
28b8cfb473
Merge pull request #87005 from yuxiaobo96/k8s-unuseful
Add a comment for function WithPlugin
2020-01-10 12:24:36 -08:00
yuxiaobo
d2cfd4b82f apply review advice again
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-10 16:47:30 +08:00
Kubernetes Prow Robot
f4e6ff84b3
Merge pull request #86529 from hase1128/kube-scheduler-reference
Add simple reference to synopsis of kube-scheduler
2020-01-09 13:29:06 -08:00
Kubernetes Prow Robot
720e6de6b9
Merge pull request #85168 from Jefftree/admission-wh-proxy
Use Network Proxy for Admission Webhooks
2020-01-08 16:07:40 -08:00
Jefftree
1289bdaba4 network proxy with admission wh 2020-01-08 15:01:38 -08:00
Matthew Mix
57f2d7ad6f Adding unit tests for kube-scheduler Config Complete() method. 2020-01-07 18:52:21 -05: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
Dan Winship
ce68edf700 Allow "kubelet --node-ip ::" to mean prefer IPv6 2020-01-07 07:53:21 -05:00
Kubernetes Prow Robot
5373fa3f59
Merge pull request #82462 from vllry/dualstack-iptables
Dualstack support for kube-proxy iptables mode
2020-01-07 04:38:20 -08:00
louisgong
8d54a84507 fix kubemark use fake CRI 2020-01-07 11:39:58 +08:00
louisgong
324e5ce7e3 hollow-node use remote CRI 2020-01-07 11:00:45 +08:00
SataQiu
72559ec693 kubeadm upgrades always persist the etcd backup for stacked 2020-01-06 12:34:28 +08:00
Kubernetes Prow Robot
10dc4a0c79
Merge pull request #86822 from ahg-g/ahg-cleanup
Cleanup deprecated scheduler functions/files
2020-01-05 12:37:41 -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
Abdullah Gharaibeh
d31dcecd20 cleanup unused scheduler functions/files 2020-01-03 19:09:14 -05: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
b3c4c90a72
Merge pull request #86673 from ahg-g/ahg1-provider
Define algorithm providers in terms of plugins
2020-01-02 22:25:53 -08: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
Abdullah Gharaibeh
a6b7b0d95e Define algorithm providers in terms of plugins. 2019-12-31 15:28:09 -05: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