Commit Graph

3733 Commits

Author SHA1 Message Date
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Kubernetes Prow Robot
b5a610064c
Merge pull request #106920 from neolit123/1.24-update-kubeadm-owners
kubeadm: update OWNERS for 1.24
2021-12-09 18:01:22 -08:00
Kubernetes Prow Robot
481459d12d
Merge pull request #106872 from calvin0327/fix-kubeadm-kubelet-constant
kubeadm: amend constant to kubelet.
2021-12-09 16:29:22 -08:00
Lubomir I. Ivanov
0290eb63b6 kubeadm: update OWNERS for 1.24 2021-12-09 21:07:56 +02:00
Kubernetes Prow Robot
8cc7d14588
Merge pull request #106859 from knight42/refactor/remove-apiserver-insecure-port
refactor(apiserver): remove the insecure flags
2021-12-09 09:48:30 -08:00
haoyun
cd3bafc2ed cleanup: remove insecure flag
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-12-09 12:36:29 +08:00
Lubomir I. Ivanov
c78afc695b kubeadm: print the CA of kubeconfig files in "check expiration"
Apply a small fix to ensure the kubeconfig files
that kubeadm manages have a CA when printed in the table
of the "check expiration" command. "CAName" is the field used for that.

In practice kubeconfig files can contain multiple credentials
from different CAs, but this is not supported by kubeadm and there
is a single cluster CA that signs the single client cert/key
in kubeadm managed kubeconfigs.
2021-12-08 20:50:23 +02:00
Lubomir I. Ivanov
6603cf6357 kubeadm: validate local etcd certficates during expiration checks
In case stacked etcd is used, the code that does expiration checks
does not validate if the etcd CA is "external" (missing key)
and if the etcd CA signed certificates are valid.

Add a new function UsingExternalEtcdCA() similar to existing functions
for the cluster CA and front-proxy CA, that performs the checks for
missing etcd CA key and certificate validity.

This function only runs for stacked etcd, since if etcd is external
kubeadm does not track any certs signed by that etcd CA.

This fixes a bug where the etcd CA will be reported as local even
if the etcd/ca.key is missing during "certs check-expiration".
2021-12-08 20:39:14 +02:00
calvin
fdf33a27c4 amend constant to kubelet 2021-12-08 14:17:34 +08:00
Lubomir I. Ivanov
847b2e1085 kubeadm: avoid requiring a CA key during kubeconfig expiration checks
When the "kubeadm certs check-expiration" command is used and
if the ca.key is not present, regular on disk certificate reads
pass fine, but fail for kubeconfig files. The reason for the
failure is that reading of kubeconfig files currently
requires reading both the CA key and cert from disk. Reading the CA
is done to ensure that the CA cert in the kubeconfig is not out of date
during renewal.

Instead of requiring both a CA key and cert to be read, only read
the CA cert from disk, as only the cert is needed for kubeconfig files.

This fixes printing the cert expiration table even if the ca.key
is missing on a host (i.e. the CA is considered external).
2021-12-07 20:48:45 +02:00
Hanna Lee
c862d7c0e9 Fix last remaining SA5011 error by removing unnecessary r != nil check 2021-11-17 08:56:01 +01:00
Kubernetes Prow Robot
1c127d3682
Merge pull request #105706 from uthark/oatamanenko/upgrade-etcd-3.5.1
Upgrade etcd to 3.5.1
2021-11-15 10:04:59 -08:00
navist2020
bc4bbd88b2 kubeadm/certs/renew:remove deprecated flags csrOnly and csrPath 2021-11-12 17:44:35 +08:00
Kubernetes Prow Robot
35f9bcabf1
Merge pull request #105992 from hwdef/fix-kubeadm-2419
kubeadm: add mutation for Linux paths in KubeletConfiguration on Windows
2021-11-11 19:48:29 -08:00
hwdef
b985e094b0 kubeadm: fix absolute paths do not work properly in config files in windows 2021-11-12 10:42:46 +08:00
Lubomir I. Ivanov
e1571bf665 kubeadm: fix typo in KubeProxyClusterRoleBindingName constant
kubeam:node-proxier -> kubeadm:node-proxier
This causes e2e test failures:
"[area-kubeadm] proxy addon kube-proxy ServiceAccount should
be bound to the system:node-proxier cluster role"

in:
- kubeadm-kinder-latest
- kubeadm-kinder-latest-on-...
- other tests
2021-11-10 21:19:30 +02:00
Etienne Champetier
356d9e0626 kubeadm: fix inverted warning message
Before this commit when setting bindAddress to 1.2.3.4 the warning was:
The recommended value for "bindAddress" in "KubeProxyConfiguration" is: 1.2.3.4; the provided value is: 0.0.0.0

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2021-11-09 20:54:57 -05:00
Kubernetes Prow Robot
e759c32129
Merge pull request #106243 from calvin0327/fix-kubeadm-init-constant
fix some kubeadm init phase constants
2021-11-09 11:28:24 -08:00
Kubernetes Prow Robot
5848dbaa80
Merge pull request #105741 from neolit123/1.23-kubeadm-kubelet-config-map-change
kubeadm: introduce the UnversionedKubeletConfigMap feature gate
2021-11-09 11:27:48 -08:00
calvin
c5c9429d0e fix some kubeadm init phase constants 2021-11-09 10:30:01 +08:00
Lubomir I. Ivanov
68118d7319 kubeadm: remove unused / legacy function DownloadConfig
The function has been marked as deprecated for a long time
and has been unused in the code base.

Remove it.
2021-11-08 17:31:29 +02:00
Lubomir I. Ivanov
a6587f4ffb kubeadm: add the UnversionedKubeletConfigMap feature gate
Add the UnversionedKubeletConfigMap feature gate that can
be used to control legacy vs new behavior for naming the
default configmap used to store the KubeletConfiguration.

Update related unit tests.
2021-11-08 17:31:29 +02:00
Kubernetes Prow Robot
73f4064fff
Merge pull request #105295 from neolit123/1.23-add-output-v1alpha2
kubeadm: add a new output/v1alpha2 API; deprecate output/v1alpha1
2021-11-08 06:01:11 -08:00
Kubernetes Prow Robot
4ce435cc95
Merge pull request #105251 from calvin0327/issue-upgrade-coredns
Update corefile-migration to v1.0.14 and update coredns to 1.8.6
2021-11-05 14:48:39 -07:00
Kubernetes Prow Robot
6d30c96d4a
Merge pull request #106042 from chendave/aggregate
kubeadm: aggregate all the errors when the shared certs are validated
2021-11-04 10:06:15 -07:00
Dave Chen
c85fb0e6ac Aggregate all the errors when the shared certs are validated
Instead of the individual error and return, it's better to aggregate all
the errors so that we can fix them all at once.

Take the chance to fix some comments, since kubeadm are not checking that
the certs are equal across controlplane.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-11-04 10:12:00 +08:00
Lubomir I. Ivanov
d3e1f87fca kubeadm: remove TODO about moving SchemeBuilder to k8s.io/api
This TODO is no longer in scope, thus remove it from
all register.go files under /app/apis.
2021-11-03 19:11:43 +02:00
Lubomir I. Ivanov
f73894359d kubeadm: update converters after the output/v1alpha2 addition
The addition of output/v1alpha2 made the converter-gen require
an explicit converter for:
kubeadm/v1beta2.BootstrapToken -> bootstraptoken/v1.BootstrapToken.

Add this converter under kubeadm/v1beta.
Use the converter in output/v1alpha1.
2021-11-03 19:11:43 +02:00
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
Lubomir I. Ivanov
b9171aee20 kubeadm: remove the reset/update-cluster-status phase
The phase has been deprecated and a NO-OP since 1.22.
Remove the phase related code.
2021-10-25 22:47:15 +03:00
Kubernetes Prow Robot
9251115fa1
Merge pull request #105807 from jonyhy96/fix-magic-number
kubeadm: make constant of the magic-number in bootstraptoken util
2021-10-22 04:46:37 -07:00
haoyun
9b5f28053c feat: make a const of magic-number
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2021-10-22 09:53:07 +08:00
Oleg Atamanenko
965f10f539 Upgrade etcd to 3.5.1 2021-10-18 23:09:27 -07:00
haoyun
a600e31c55 test: add test for PatchNode when error happend
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-10-19 11:01:01 +08:00
Kubernetes Prow Robot
9804a83d8f
Merge pull request #105343 from jonyhy96/fix-patch-node-once
kubeadm: fix some retry logic in PatchNodeOnce
2021-10-17 09:49:49 -07:00
haoyun
bd8f26c2d7 fix: patchNode retry logic
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-10-17 12:36:36 +08:00
navist2020
cc2802d9bb validate flag cfgPath to make sure it is not empty 2021-10-14 11:05:06 +08:00
calvin0327
941c78f411 Update corefile-migration to v1.0.14 and update coredns to 1.8.6 2021-10-12 11:03:52 +08:00
Lubomir I. Ivanov
73d528dce9 kubeadm: make output/BootstrapToken use bootstraptoken/v1 2021-09-28 16:37:41 +03:00
Lubomir I. Ivanov
47af311ea4 kubeadm: mark output/v1alpha1 as deprecated 2021-09-28 16:37:40 +03:00
Lubomir I. Ivanov
473e781ccb kubeadm: set output/v1alpha2 as the priority version 2021-09-28 16:37:40 +03:00
Lubomir I. Ivanov
b92966aeac kubeadm: use output/v1alpha2 in kubeadm commands
Use the new API for "config images list" and
"token list".
2021-09-28 16:37:40 +03:00
Lubomir I. Ivanov
2d4fcedbcf kubeadm: add a new output/v1alpha2 API
The API is a copy of output/v1alpha1 with a minor difference
where output/v1alpha2.BootstrapToken embeds
bootstraptoken/v1.BootstrapToken instead of
kubeadm/v1beta2.BootstrapToken.

Embedding the later is an undesired binding between the "kubeadm"
and "output" groups, preventing the eventual deprecation and removal
of the kubeadm.v1beta2 API.

This new output API version, unlike v1alpha1, does not include
defaulting which is not needed.
2021-09-28 16:37:26 +03:00
Kubernetes Prow Robot
bf000e8770
Merge pull request #104770 from pacoxu/dual-stack-ga-kubeadm
cleanup: DualStack GA for kubeadm
2021-09-28 03:42:42 -07:00
Paco Xu
751ad37a05 kubeadm: cleanup remove some empty feature gate for dual-stack 2021-09-28 15:34:26 +08:00
Khaled Henidak (Kal)
a53e2eaeab
move IPv6DualStack feature to stable. (#104691)
* kube-proxy

* endpoints controller

* app: kube-controller-manager

* app: cloud-controller-manager

* kubelet

* app: api-server

* node utils + registry/strategy

* api: validation (comment removal)

* api:pod strategy (util pkg)

* api: docs

* core: integration testing

* kubeadm: change feature gate to GA

* service registry and rest stack

* move feature to GA

* generated
2021-09-24 16:30:22 -07:00
Kubernetes Prow Robot
91f820eee4
Merge pull request #104854 from pacoxu/kubeadm-swap-check
kubeadm: move swap on check error to warning since NodeSwap is beta
2021-09-17 04:57:13 -07:00
Kubernetes Prow Robot
8975906dfc
Merge pull request #104942 from SataQiu/kubeadm-20210912
kubeadm: do not check if the /etc/kubernetes/manifests folder is empty on joining worker nodes during preflight
2021-09-15 11:16:11 -07:00
Paco Xu
0b8433a3f5 kubeadm: remove --port from kube-scheduler manifest 2021-09-15 12:58:35 +08:00
Kubernetes Prow Robot
fa2657b8b2
Merge pull request #104624 from Haleygo/support-null-resolvConf-in-configFile
When resolvConf is "" in kubelet configuration, pod will be created with wrong dns policy
2021-09-14 14:18:59 -07:00