Commit Graph

9091 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
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
Jin Hase
c715aacdc2 Add simple reference to synopsis of kube-scheduler 2019-12-20 20:55:35 +09:00
Jacek Kaniuk
4303be3d9f Revert pull request #85879 "hollow-node use remote CRI" 2019-12-19 10:52:35 +01:00
Kubernetes Prow Robot
8cd8784289
Merge pull request #78380 from hainesc/master
Add test cases for a helper function in controller manager
2019-12-18 18:25:55 -08:00
Kubernetes Prow Robot
814fc34cde
Merge pull request #85879 from gongguan/cri-kubemark
hollow-node use remote CRI
2019-12-18 06:01:57 -08: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
louisgong
e8e1cc9ee0 extract PreInitRuntimeService from NewMainKubelet 2019-12-18 11:48:29 +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
RainbowMango
4eb61e3f93 Deal with auto-generated files:
- Update bazel by hack/update-bazel.sh
- make update
2019-12-17 21:46:41 +08:00
RainbowMango
9b7d8712cf Add show hidden flag to kube-proxy 2019-12-17 21:46:41 +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
Vallery Lancey
23957a6b28 Allow kube-proxy iptables mode to support dual-stack, with the meta-proxier. 2019-12-16 22:50:25 -08:00
Kubernetes Prow Robot
078344c125
Merge pull request #86016 from robscott/endpointslice-windows-proxy
Ensuring EndpointSlices are not used for Windows kube-proxy implementations
2019-12-16 21:38:18 -08:00
Haines Chan
01f1cf3c96 Add test cases for a helper function in controller manager 2019-12-17 12:31:53 +08:00
carlory
2fe82075b4 fix staticcheck faulures in 'cmd' pkg 2019-12-16 18:32:54 +08:00
Kubernetes Prow Robot
6a919f2b54
Merge pull request #85903 from liggitt/disable-deprecated-apis
Remove ability to re-enable serving deprecated APIs
2019-12-13 16:19:36 -08:00
Jordan Liggitt
3df9e86a4e Remove ability to re-enable serving deprecated APIs 2019-12-13 12:21:33 -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
Jianfei Bai
dfb6c3424f move unwanted console output out of versiongetter. 2019-12-08 10:26:27 +08:00
Rob Scott
dfa04bfc04
Ensuring EndpointSlices are not used for Windows kube-proxy implementations 2019-12-06 15:39:00 -08:00
Kubernetes Prow Robot
3994f52ee6
Merge pull request #85953 from St0rmingBr4in/verify-context-exists
kubeadm: Throw an error if the currentContext does not exists
2019-12-06 05:35:03 -08:00
Julien DOCHE
3e19201ec2 kubeadm: Throw an error if the currentContext does not exists
Check if the CurrentContext exists in validateKubeConfig

Signed-off-by: Julien DOCHE <julien.doche@gmail.com>
2019-12-06 10:15:26 +01:00
louisgong
0dd468039d inject remoteRuntime to kubelet dependency 2019-12-06 14:12:08 +08:00
Kubernetes Prow Robot
6a4216ba59
Merge pull request #85968 from liggitt/fix_bug_in_str_split
Fix bug in apiserver service cidr split
2019-12-05 15:55:39 -08:00
darshanime
f4d1674827 Refactor parsing logic for service IP and ranges, add tests
Signed-off-by: darshanime <deathbullet@gmail.com>
2019-12-05 15:35:20 -05:00
darshanime
fdd25ec968 Fix bug in apiserver service cluster cidr split
Signed-off-by: darshanime <deathbullet@gmail.com>
2019-12-05 15:35:20 -05:00
Lubomir I. Ivanov
bc22d70e2b
Revert "kubeadm: don't check if image exists before pulling" 2019-12-05 21:42:12 +02:00
bogard1203
09ede2fd98
Deleted extra 'phase' in command example
Deleted extra 'phase' for 'kubeadm alpha kubelet config' command
2019-12-04 23:45:45 +08:00
Kubernetes Prow Robot
c8b123e8e1
Merge pull request #85843 from Itxaka/kubeadm_docker_messages
Enhance error message for failed controlplane init
2019-12-04 04:08:57 -08:00
Itxaka
c355cadbb1
Enhance error message for failed controlplane init
Currently if the controlplane fails to init, we print out a message
with some example commands that only show docker CLI.

This tries to improve that by printing the example commands for
docker, cri-o and containerd by checking the socket looking for
the default docker socket.
2019-12-04 11:55:41 +01:00
Kubernetes Prow Robot
6d5eee88e0
Merge pull request #84624 from hwdef/fix-staticcheck
cmd/kube-controller-manager: fix staticcheck warning
2019-12-04 01:54:57 -08:00
louisgong
b469404d97 hollow-node use remote CRI 2019-12-04 17:07:04 +08:00
Kubernetes Prow Robot
674695c544
Merge pull request #85639 from rosti/kubeadm-cc-kind-to-group
kubeadm: Group centric component configs
2019-12-03 17:01:23 -08:00
Kubernetes Prow Robot
eff703de21
Merge pull request #84005 from yue9944882/chore/crd-internal-client-prune
Prune internal clients from CRD apiserver
2019-12-03 15:46:57 -08:00
Humberto Nanni
82206578cc
Update checks.go
match https://github.com/kubernetes/release/pull/653 add
2019-12-03 11:17:11 -06:00
yue9944882
81471c36b1 [generated] bazels and vendor/modules.txt
[generated] bazels

bazel
2019-12-04 00:49:28 +08:00
yue9944882
168f8f54f0 switch to v1 crd
switch api helper functions to v1 CRD api

switch v1 CRD for apiserver internal

switch to v1 CRD for internal controllers

api storage/validation related changes

move local-defaulting utils private to prevent spreading

boilerplate

keep the subresource status/scale spec nil unless it's enabled

clean up empty space
2019-12-04 00:49:26 +08:00
Kubernetes Prow Robot
c65c563487
Merge pull request #85412 from boluisa/1916-fix
Kubeadm: upgrade apply & upgrade node always overwrite Kubeadm-env file
2019-12-02 20:18:57 -08:00
hwdef
dddd631706 cmd/kube-controller-manager: fix staticcheck warning 2019-12-03 11:16:24 +08:00
Kubernetes Prow Robot
3769de9401
Merge pull request #85745 from aojea/kubeadm_etcd_ipv6
kubeadm: default etcd address based on the IP family
2019-12-02 15:02:58 -08:00
Rafael Fernández López
f0ea7bcf9e
kubeadm: set cluster name on the controller manager
On kubeadm's configuration it's possible to set up the cluster
name. Forward this information to the controller manager's
`--cluster-name` argument.
2019-12-02 18:32:50 +01:00
Babatunde Olu-Isa
af231b09e4 remove Kubeadm-env file overwrite from apply and node command 2019-12-01 15:28:59 -06:00
Rafael Fernández López
14fe7225c1
kubeadm: Improve resiliency in CreateOrMutateConfigMap
CreateOrMutateConfigMap was not resilient when it was trying to Create
the ConfigMap. If this operation returned an unknown error the whole
operation would fail, because it was strict in what error it was
expecting right afterwards: if the error returned by the Create call
was a IsAlreadyExists error, it would work fine. However, if an
unexpected error (such as an EOF) happened, this call would fail.

We are seeing this error specially when running control plane node
joins in an automated fashion, where things happen at a relatively
high speed pace.

It was specially easy to reproduce with kind, with several control
plane instances. E.g.:

```
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
I1130 11:43:42.788952     887 round_trippers.go:443] POST https://172.17.0.2:6443/api/v1/namespaces/kube-system/configmaps?timeout=10s  in 1013 milliseconds
Post https://172.17.0.2:6443/api/v1/namespaces/kube-system/configmaps?timeout=10s: unexpected EOF
unable to create ConfigMap
k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient.CreateOrMutateConfigMap
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient/idempotency.go:65
```

This change makes this logic more resilient to unknown errors. It will
retry on the light of unknown errors until some of the expected error
happens: either `IsAlreadyExists`, in which case we will mutate the
ConfigMap, or no error, in which case the ConfigMap has been created.
2019-11-30 22:48:16 +01:00
Antonio Ojea
335a3e9efb kubeadm: use correct IP family for etcd localhost
kubeadm always use the IPv4 localhost address by defaultA for etcd

The probe hostname is obtained before the generation of the etcd
parameters, so it can't detect the right IP familiy for the
host of the probe.
This causes that with IPv6 clusters doesn't work because the probe
uses the IPv4 localhost address.

This patchs configures the right localhost address based on the used
AdvertiseAddress IP family.
2019-11-30 17:25:30 +01:00
Kubernetes Prow Robot
85f8005cf0
Merge pull request #85468 from neolit123/1.17-discovery-token-fix
kubeadm: simplify discover/token and add detailed unit tests
2019-11-29 09:35:03 -08:00
Antonio Ojea
798d2fb75a
Fix comment typo 2019-11-29 13:38:47 +01:00
Kubernetes Prow Robot
fe0a4749e3
Merge pull request #85654 from aramase/add-config-test
add applyto tests for controller configs
2019-11-26 16:51:33 -08:00
Lubomir I. Ivanov
ce68a89d26 kubeadm: simplify discover/token and add detailed unit tests
- Add retrieveValidatedConfigInfo to be able to better unit
test the function.
- Break some of the logic in RetrieveValidatedConfigInfo into
helper functions.
- Pass JoinConfiguration.Discovery to RetrieveValidatedConfigInfo
instead of JoinConfiguration.
- Use the discovery timeout per API call to fetch cluster-info
(optionally the user value can be slit in 2).
- Add detailed unit tests for retrieveValidatedConfigInfo.
2019-11-27 01:16:43 +02:00
Anish Ramasekar
18ba2643db
add applyto tests for controller configs 2019-11-26 13:02:12 -08:00
David Eads
3c1dc89d98 fix kube-apiserver poststarthook additions to avoid duplicating them 2019-11-26 14:05:06 -05:00
Kubernetes Prow Robot
2bc3804a0e
Merge pull request #81319 from neolit123/1.16-kubeadm-upgrade-health-check
kubeadm: add a upgrade health check that deploys a Job
2019-11-26 10:52:51 -08:00
Kubernetes Prow Robot
e51caab732
Merge pull request #85603 from bart0sh/PR008-kubeadm-dont-check-if-image-exists
kubeadm: don't check if image exists before pulling
2019-11-26 05:27:10 -08:00
Rostislav M. Georgiev
b881f19c8b kubeadm: Group centric component configs
kubeadm's current implementation of component config support is "kind" centric.
This has its downsides. Namely:
- Kind names and numbers can change between config versions.
  Newer kinds can be ignored. Therefore, detection of a version change is
  considerably harder.
- A component config can have only one kind that is managed by kubeadm.
Thus a more appropriate way to identify component configs is required.

Probably the best solution identified so far is a config group.
A group name is unlikely to change between versions, while the kind names and
structure can.
Tracking component configs by group name allows us to:
- Spot more easily config version changes and manage alternate versions.
- Support more than one kind in a config group/version.
- Abstract component configs by hiding their exact structure.

Hence, this change rips off the old kind based support for component configs
and replaces it with a group name based one. This also has the following
extra benefits:
- More tests were added.
- kubeadm now errors out if an unsupported version of a known component group
  is used.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-11-26 13:55:28 +02:00
Arvinderpal Wander
e8ee8622b8 Add support for new dual-stack flags for kubernetes-controller-
manager in kubeadm:
 - node-cidr-mask-size-ipv4
 - node-cidr-mask-size-ipv6
2019-11-25 09:11:16 -08:00
Ed Bartosh
7898b3f0a8 kubeadm: update image pull tests 2019-11-25 15:04:28 +02:00
Ed Bartosh
f6f3738a00 kubeadm: don't check if image exists before pulling
Removed image existence as kubeadm may miss
image tags if they're updated.
2019-11-25 13:00:50 +02:00
Kubernetes Prow Robot
d50717d061
Merge pull request #85500 from aramase/fix-85491
Set node cidr mask size ipv4/ipv6 config
2019-11-23 12:09:50 -08:00
Kubernetes Prow Robot
f01a4d0608
Merge pull request #85265 from SataQiu/fix-kubeadm-20191114
kubeadm: reset raises warnings if it cannot delete folders
2019-11-22 17:30:17 -08:00
Lubomir I. Ivanov
906d3159b1 kubeadm: add a upgrade health check that deploys a Job
- Add a new preflight check for upgrade that runs the pause container
with -v in a Job.
- Wait for the Job to complete and return an error after N seconds.
- Manually clean the Job because we don't have the TTL controller
enabled in kubeadm yet (it's still alpha).
2019-11-22 18:04:40 +02:00
Arvinderpal Wander
c025cfcd9c Initialize FeatureGate map for KubeProxy config. #1929 2019-11-21 20:46:25 -08:00
Anish Ramasekar
7b478d15d5
Set node cidr mask size ipv4/ipv6 config 2019-11-20 22:08:58 -08:00
Ted Yu
5be960c34d Fill in default node cidr mask size when dual stack is not enabled 2019-11-20 19:50:33 -08:00
Benjamin Elder
820b7dfa1b fix providerless build post-CSI migration 2019-11-19 09:47:44 -08:00
Kubernetes Prow Robot
c3f8d700ac
Merge pull request #85367 from aramase/node-cidr-followup
[kube controller manager] add comments for compatibility
2019-11-15 19:09:54 -08:00
Kubernetes Prow Robot
01e1dcf429
Merge pull request #85351 from rosti/kubeadm-fix-kubelet-version-check
kubeadm: Use only stdout when calling kubelet for its version
2019-11-15 19:09:41 -08:00
Kubernetes Prow Robot
b8c29966cb
Merge pull request #85348 from ereslibre/validator-names
kubeadm: use the right name for the no validator function
2019-11-15 16:17:42 -08:00
Anish Ramasekar
128f33b26e
add comments for compatibility 2019-11-15 15:38:06 -08:00
Rostislav M. Georgiev
d425520806 kubeadm: Use only stdout when calling kubelet for its version
Currently this uses the combined kubelet output (stdout + stderr), but this
causes parsing issues if the kubelet logs something on stderr.
Thus we ignore the entire stderr and use stdout only.

We do disable a couple of tests here. That is because the fakeexecer only
supports combined output and return a "not supported" error if `.Output()`
gets invoked thus permanently failing those.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-11-15 18:50:40 +02:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Rafael Fernández López
d049eb71fa
kubeadm: use the right name for the no validator function 2019-11-15 16:03:40 +01:00
SataQiu
b7b10fc899 kubeadm: reset raises warnings if it cannot delete folders 2019-11-15 22:54:05 +08:00
Kubernetes Prow Robot
d9be37e926
Merge pull request #72046 from m1093782566/service-topology-api
Service Topology implementation
2019-11-15 02:57:42 -08:00
Kubernetes Prow Robot
ded6ee953c
Merge pull request #79993 from aramase/controller-manager-multiple-cidr
Allow multiple node cidr masks in kube-controller-manager
2019-11-14 23:23:42 -08:00
Roc Chan
31d623b4d7 Autogenerated files 2019-11-15 14:37:44 +08:00
Roc Chan
c9cf3f5b72 Service Topology implementation
* Implement Service Topology for ipvs and iptables proxier
* Add test files
* API validation
2019-11-15 13:36:43 +08:00
Kubernetes Prow Robot
372ebd24f5
Merge pull request #83098 from ddebroy/disable-intree
CSI Migration phase 2: disable probing of in-tree plugins
2019-11-14 20:51:42 -08:00
Anish Ramasekar
796faba4ac
Allow multiple node cidr masks in cm
update tests

add comment

amend var name

update comment

add check for empty slice

fix tests

fix mask size in test

review feedback

add ipv4 and ipv6 flag for mask sizes

add to violation exception list

remove import alias

run update-openapi-spec

review feedback

run update-bazel

review feedback

review feedback
2019-11-14 20:04:31 -08:00
Deep Debroy
129f15328b Disable in-tree plugins migrated to CSI
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-11-14 17:28:21 -08:00
Kubernetes Prow Robot
12b18f200a
Merge pull request #85301 from robscott/endpointslice-beta-fix
Ensuring EndpointSlice controller does not start when feature gate or API are disabled
2019-11-14 16:39:17 -08:00
Jordan Liggitt
a5760dee81 Add support for --runtime-config=api/beta=false, --feature-gates=AllBeta=false
Allow disabling all beta features and APIs
2019-11-14 14:37:55 -05:00
Rob Scott
77df6bc9a8
Ensuring EndpointSlice controller does not start when feature gate or
API are disabled
2019-11-14 10:52:09 -08:00
Kubernetes Prow Robot
d1e8702d36
Merge pull request #85201 from fabriziopandini/add-retry-to-etcd
kubeadm: add retry to etcd calls
2019-11-14 07:07:34 -08:00
RainbowMango
0412369bcd Deal with auto-generated files:
- Update bazel by hack/update-bazel.sh
2019-11-14 20:34:38 +08:00
RainbowMango
c4f8c6eea7 Add flag for which to show hidden metrics to kube-controller-manager 2019-11-14 20:32:19 +08:00
fabriziopandini
0573a2227f add retry to etcd operations 2019-11-14 09:27:03 +01:00
Kubernetes Prow Robot
c6a38a9700
Merge pull request #85229 from liggitt/kubeadm-imports
guard kubeadm dependencies on k8s.io/kubernetes
2019-11-13 17:29:05 -08:00
Kubernetes Prow Robot
64f4be5b32
Merge pull request #84390 from robscott/endpointslice-beta
Promoting EndpointSlices to beta
2019-11-13 17:27:50 -08:00
Kubernetes Prow Robot
02af1dd62c
Merge pull request #85004 from deads2k/dynamic-agg-cert
dynamic reload cluster authentication info for aggregated API servers
2019-11-13 14:50:54 -08:00
Rob Scott
a7e589a8c6
Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
Kubernetes Prow Robot
f5df681b80
Merge pull request #85156 from chuckha/remove-infinte-poll
[kubeadm] Remove nested retries
2019-11-13 13:04:23 -08:00
Kubernetes Prow Robot
7d1580270a
Merge pull request #85151 from hypnoglow/scheduler-default-algo-source
scheduler: make algorithm source an option
2019-11-13 13:04:09 -08:00