Commit Graph

9091 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
31b8c0d23d
Merge pull request #87656 from ereslibre/do-not-depend-on-cluster-status
kubeadm: deprecate the `ClusterStatus` dependency
2020-02-22 22:30:47 -08:00
Kubernetes Prow Robot
b893aa707e
Merge pull request #88052 from neolit123/1.18-renew-use-ca-in-kubeconfig
kubeadm: update embedded CA in kubeconfig files on renewal
2020-02-22 20:50:47 -08:00
Taesun Lee
d10e3da92d Fix typos in some error messages, comments
- cmd/kubeadm
- RemoveContnainers -> RemoveContainers
- iterface -> interface
- stategicMergeSlice -> strategicMergeSlice
2020-02-23 00:44:47 +09:00
Satyadeep Musuvathy
8c6956e5bb Refactor handling of local traffic detection. 2020-02-21 17:57:34 -08:00
Kubernetes Prow Robot
58fcca211f
Merge pull request #88359 from taesunny/master
Fix: Typos in apiclient util.
2020-02-20 19:50:46 -08:00
Kubernetes Prow Robot
58596b2bf5
Merge pull request #88347 from neolit123/1.18-kubeadm-update-constants
kubeadm: update constants for 1.18
2020-02-20 04:29:43 -08:00
Kubernetes Prow Robot
79b674d827
Merge pull request #84381 from Sh4d1/egress_selector_proxy_v2
Use network proxy for proxy subresources
2020-02-20 04:29:03 -08:00
Rafael Fernández López
3e59a0651f
kubeadm: optimize the upgrade path from ClusterStatus to annotations
When doing the very first upgrade from a cluster that contains the
source of truth in the ClusterStatus struct, the new kubeadm logic
will try to retrieve this information from annotations.

This changeset adds to both etcd and apiserver endpoint retrieval the
special case in which they won't retry if we are in such cases. The
logic will retry if we find any unknown error, but will not retry in
the following cases:

- etcd annotations do not contain etcd endpoints, but the overall list
  of etcd pods is greater than 0. This means that we listed at least
  one etcd pod, but they are missing the annotation.

- API server annotation is not found on the api server pod for a given
  node name, but no errors aside from that one were found. This means
  that the API server pod is present, but is missing the annotation.

In both cases there is no point in retrying, and so, this speeds up the
upgrade path when coming from a previous existing cluster.
2020-02-20 12:19:05 +01:00
Rafael Fernández López
b140c5d64b
kubeadm: remove ClusterStatus dependency
While `ClusterStatus` will be maintained and uploaded, it won't be
used by the internal `kubeadm` logic in order to determine the etcd
endpoints anymore.

The only exception is during the first upgrade cycle (`kubeadm upgrade
apply`, `kubeadm upgrade node`), in which we will fallback to the
ClusterStatus to let the upgrade path add the required annotations to
the newly created static pods.
2020-02-20 12:18:56 +01:00
Taesun Lee
97fc3e6139
Fix typos in apiclient util
fix initalTimeout to initialTimeout
2020-02-20 15:20:04 +09:00
Lubomir I. Ivanov
ad8bf3c139 kubeadm: do not pin unit tests to a version 2020-02-19 22:20:33 +02:00
Lubomir I. Ivanov
22319019ab kubeadm: update constants for 1.18
- Include 1.19 as a supported etcd mapping.
- Update minimum and current versions.
2020-02-19 21:40:46 +02:00
Kubernetes Prow Robot
5bd719b6a6
Merge pull request #86810 from bart0sh/PR0087-kubeadm-output-images
kubeadm config images list: implement structured output
2020-02-17 17:07:28 -08:00
Kubernetes Prow Robot
ea5cef1c65
Merge pull request #87870 from tedyu/restore-proxier-updater
Use ProxierHealthUpdater directly to avoid panic
2020-02-17 10:13:29 -08:00
Ed Bartosh
a31ccc7b99 kubeadm config images list: test structured output
Implemented tests for 'kubeadm config images list' structured output.
2020-02-17 17:26:17 +02:00
Ed Bartosh
23e4d05083 kubeadm config images list: implement structured output
Used cli-runtime API to print image info in 5 formats:

  - TEXT (identical to the current output)
  - YAML
  - JSON
  - JSONPATH
  - Go template
2020-02-17 17:23:08 +02:00
Ed Bartosh
be7e5b47fe kubeadm config images list: update output API 2020-02-17 17:23:08 +02:00
Benjamin Elder
d827f2634a update stale pause image comment 2020-02-14 14:03:19 -08:00
Benjamin Elder
1631825e44 bump pause to 3.2 in kubelet 2020-02-14 11:40:15 -08:00
Benjamin Elder
a00a1e39ef bump pause to 3.2 in kubeadm 2020-02-14 11:40:15 -08:00
Marek Siarkowicz
8b825d1511 Add show-hidden-metrics-for-version to scheduler 2020-02-14 10:14:31 +01:00
Kubernetes Prow Robot
029e1a06d7
Merge pull request #87967 from zhan849/harry/controller-queue-metrics
register queue metrics in controller manager
2020-02-13 16:55:11 -08:00
Kubernetes Prow Robot
77e8c75f32
Merge pull request #87754 from MikeSpreitzer/apf-filter5
Add twice refactored filter and config consumer for API Priority and Fairness
2020-02-13 16:54:46 -08:00
Kubernetes Prow Robot
35bb71d855
Merge pull request #88092 from yujuhong/rm-beta-labels
Replace Beta OS/arch labels with the GA ones
2020-02-13 14:14:02 -08:00
Yu-Ju Hong
bcd975aa65 Replace Beta OS/arch labels with the GA ones
Beta OS/arch labels have been deprecated since 1.14.
This change replaces these labels with the GA ones.
2020-02-13 09:38:51 -08:00
Aldo Culquicondor
99bda6fac0 Remove HardPodAffinityWeight from v1alpha2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-13 11:59:56 -05:00
Patrik Cyvoct
6729bfd648
use network proxy for proxy subresources
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-02-13 14:42:34 +01:00
Kubernetes Prow Robot
8ca96f3e07
Merge pull request #80724 from cceckman/provider-info-e2e
Provide OIDC discovery for service account token issuer
2020-02-13 01:38:35 -08:00
skilxn-go
f5b7e3cca3 Rename PostFilter plugin to PreScore 2020-02-12 23:25:08 +08:00
Lubomir I. Ivanov
0ba5891519 kubeadm: update embedded CA in kubeconfig files on renewal
While kubeadm does not support CA rotation,
the users might still attempt to perform this manually.
For kubeconfig files, updating to a new CA is not reflected
and users need to embed new CA PEM manually.

On kubeconfig cert renewal, always keep the embedded CA
in sync with the one on disk.

Includes a couple of typo fixes.
2020-02-12 05:03:20 +02:00
Charles Eckman
5a176ac772 Provide OIDC discovery endpoints
- Add handlers for service account issuer metadata.
- Add option to manually override JWKS URI.
- Add unit and integration tests.
- Add a separate ServiceAccountIssuerDiscovery feature gate.

Additional notes:
- If not explicitly overridden, the JWKS URI will be based on
  the API server's external address and port.

- The metadata server is configured with the validating key set rather
than the signing key set. This allows for key rotation because tokens
can still be validated by the keys exposed in the JWKs URL, even if the
signing key has been rotated (note this may still be a short window if
tokens have short lifetimes).

- The trust model of OIDC discovery requires that the relying party
fetch the issuer metadata via HTTPS; the trust of the issuer metadata
comes from the server presenting a TLS certificate with a trust chain
back to the from the relying party's root(s) of trust. For tests, we use
a local issuer (https://kubernetes.default.svc) for the certificate
so that workloads within the cluster can authenticate it when fetching
OIDC metadata. An API server cannot validly claim https://kubernetes.io,
but within the cluster, it is the authority for kubernetes.default.svc,
according to the in-cluster config.

Co-authored-by: Michael Taufen <mtaufen@google.com>
2020-02-11 16:23:31 -08:00
Mike Spreitzer
73614ddd4e Added API Priority and Fairness filter and config consumer 2020-02-10 22:54:40 -05:00
Ted Yu
7a0690cd59 Use ProxierHealthUpdater directly to avoid panic 2020-02-10 09:41:09 -08:00
SataQiu
f2150587f3 kubeadm: remove 'kubeadm upgrade node config' 2020-02-10 18:28:41 +08:00
Harry Zhang
63f0078ccc register queue metrics in controller manager 2020-02-09 14:41:17 -08:00
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
a280a967a5 Merge pull request #87853 from alculquicondor/fix/options_test
Do lenient decoding only for kubescheduler.config.k8s.io/v1alpha1
2020-02-08 14:46:21 -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
Kubernetes Prow Robot
25501f8425
Merge pull request #87886 from RA489/rmbasheg
remove bash examples/comments from the v1beta1 and v1beta2 APIs
2020-02-08 00:21: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
Aldo Culquicondor
2ffb13e822 Do lenient decoding only for kubescheduler config v1alpha1
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-07 15:41:00 -05: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
Tim Allclair
9d3670f358 Ensure testing credentials are labeled as such 2020-02-04 10:36:05 -08: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
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