Commit Graph

4127 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
2eb4eac581
Merge pull request #118353 from SataQiu/fix-kubeadm-test-20230531
kubeadm: add command-line integration test to ensure that the supported etcd version is always available for the stable Kubernetes version
2023-06-02 04:40:53 -07:00
SataQiu
daa7115907 kubeadm: add deprecation message for UpgradeAddonsBeforeControlPlane feature gate 2023-06-01 23:06:26 +08:00
Kubernetes Prow Robot
33a2438de9
Merge pull request #118341 from pacoxu/add-pacoxu-kubeadm
add pacoxu to kubeadm approvers
2023-06-01 04:33:46 -07:00
SataQiu
d49c43abde kubeadm: add integration test to ensure that the supported etcd version is always available for the stable Kubernetes version 2023-06-01 18:45:06 +08:00
Paco Xu
f2a5e247eb add pacoxu to kubeadm approvers list 2023-05-31 10:34:42 +08:00
Paco Xu
85e0d8c8b1
Revert "kubeadm: add --feature-gates flag for kubeadm upgrade node" 2023-05-31 00:30:08 +08:00
Kubernetes Prow Robot
320d915897
Merge pull request #118316 from SataQiu/fix-kubeadm-20230529
kubeadm: add --feature-gates flag for kubeadm upgrade node
2023-05-29 13:01:43 -07:00
Kubernetes Prow Robot
76bad75c1e
Merge pull request #118270 from pacoxu/warningonly-for-deprecatedFG
kubeadm: warning only for deprecated FG
2023-05-29 08:23:55 -07:00
SataQiu
4523a301c8 kubeadm: enable --feature-gates flag for kubeadm upgrade node 2023-05-29 21:32:42 +08:00
Paco Xu
0951204298 kubeadm: Supports() return true for all alpha/beta/ga/deprecated 2023-05-29 13:05:20 +08:00
SataQiu
c6aaa1eab0 kubeadm: lower the log level of EtcdSupportedVersion warning message as it is a kubeadm internal warning 2023-05-29 10:39:20 +08:00
Paco Xu
6a867eacd8 kubeadm: warning only for deprecated FG 2023-05-26 09:47:40 +08:00
Kubernetes Prow Robot
03ebd4b7ef
Merge pull request #116656 from HirazawaUi/fik-fd-leaks
Cleanup fd leaks and file removal cleanup
2023-05-24 22:50:50 -07:00
Kubernetes Prow Robot
90ed8ba687
Merge pull request #118013 from neolit123/1.28-add-config-validate
kubeadm: add the "config validate" subcommand
2023-05-24 20:36:49 -07:00
Lubomir I. Ivanov
72e4c9a82a kubeadm: add the "config validate" subcommand
The command can be used to validate an input --config and throw
warnings and errors.

Add a new argument strctErrors to the functions
documentMapTo{Init|Join}Configuration(). This allows
to return errors from the calls to VerifyUnmarshalStrict().

Add a new function verifyKnownGVKs() in config/common.go
that is used to verify if a list of GVKs in a config file is
known. This function is used by the "validate" and "migrate"
commands.

Both commands now throw errors for unknown APIs or fields.
2023-05-24 21:22:02 +03:00
Kubernetes Prow Robot
7024beeeeb
Merge pull request #117984 from champtar/kubeadm-init-speedup
kubeadm: speedup init by 0s or 20s
2023-05-24 09:09:01 -07:00
Lubomir I. Ivanov
d8db9640fa kubeadm: remove function pointer comparison in phase test
TestBindToCommandArgRequirements has a .Pointer()
comparison that is not guaranteed to pass given
the reflected functions are closures.

This test is consistently failing on Go 1.21 rc1.
Remove said comparison from the test.
2023-05-20 23:03:45 +03:00
Kubernetes Prow Robot
589d6f3886
Merge pull request #117630 from skitt/intstr-fromint32-cluster-lifecycle
Cluster lifecycle: use new intstr functions
2023-05-19 08:50:30 -07:00
Kubernetes Prow Robot
15a1f9a39d
Merge pull request #117921 from kkkkun/clean-up-etcd-version
clean up unsupport etcd version
2023-05-18 20:30:28 -07:00
Etienne Champetier
19ae2de19c kubeadm: speedup init by 0s or 20s
Before this commit, kubeadm starts kubelet before it creates
/etc/kubernetes/manifests. On boot, kubelet tries to load the
static pod manifests from this dir by calling `listConfig()`
7ad8303b96/pkg/kubelet/config/file.go (L97)
and it'll then try to start a file watcher every second for 20s
7ad8303b96/pkg/kubelet/config/file.go (L114)
7ad8303b96/pkg/kubelet/config/file_linux.go (L51-L67)

If kubelet starts and calls `listConfig()` before kubeadm creates
`/etc/kubernetes/manifests` (while writing the static pods manifests),
the file watcher will be created less than a second after, but there
will be no changes to report, so the manifests will only be detected
on the next tick of `listTicker`, a bit less than 20s later
7ad8303b96/pkg/kubelet/config/file.go (L102-L103)

Even if we fixed the watch code to `listConfig()` just after starting the
inotify watch, watching source file is only supported on linux,
so moving the manifests generation before kubelet start fixes all
cases and make more sense IMO.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2023-05-18 15:09:15 -04:00
Kubernetes Prow Robot
f9d97e0880
Merge pull request #118069 from SataQiu/fix-kubeadm-20230517
kubeadm: fix a bug where the static pod changes detection logic is inconsistent with kubelet
2023-05-17 21:26:40 -07:00
SataQiu
261de704c2 kubeadm: fix a bug where the static pod changes detection logic is inconsistent with kubelet 2023-05-17 17:05:24 +08:00
kkkkun
8b4840aa37 clean up unsupport etcd version
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-05-17 16:35:50 +08:00
Humble Chirammal
e3eb4bd0c5 updating dependencies.yaml for etcd v3.5.9 version
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-05-16 20:27:17 +05:30
Daniel Lipovetsky
ef9f8d7c0c
kubeadm: Remove leading zeros from etcd member ID in log messages 2023-05-12 17:38:44 -07:00
Daniel Lipovetsky
ff4c6916ec
kubeadm: Fix log message when etcd member is added as learner 2023-05-12 17:38:44 -07:00
Kubernetes Prow Robot
19aaf0c0e1
Merge pull request #117724 from dlipovetsky/kubeadm-remove-etcd-member-idempotent
kubeadm: Make etcd member removal idempotent
2023-05-10 12:08:59 -07:00
Daniel Lipovetsky
5fd5768ef3
kubeadm: Make etcd member removal idempotent
If the etcd member is not found, then it has already been removed, and
kubeadm reset should immediately complete the 'remove-etcd-member'
phase. Previously, the phase would complete only once the
exponential-backoff retry expired, up to 3 minutes duration.

This commit also fixes a semantic error in etcd.GetMemberID. Previously,
the function returned 0 if no member was found, but 0 is not a valid
member ID.
2023-05-10 09:13:31 -07:00
Kubernetes Prow Robot
626b2db1ca
Merge pull request #117335 from kkkkun/update-etcd-3.5.8
etcd: Update version to 3.5.8
2023-05-10 03:38:59 -07:00
Kubernetes Prow Robot
44a93d0b9d
Merge pull request #117792 from dlipovetsky/kubeadm-etcd-client-refactor
kubeadm: Add etcd client unit tests
2023-05-09 11:02:20 -07:00
HirazawaUi
82e3fa0930 fix fd leaks and failed file removing for main pkg and cmd 2023-05-09 09:24:11 -05:00
Min Ni
e865b30abd
update serial number to a valid non-zero number in ca certificate (#117791)
* update serial number to a valid non-zero number in ca certificate

* fix the existing problem (0 SerialNumber in all certificate) as part of this PR in a separate commit
2023-05-09 06:34:08 -07:00
Daniel Lipovetsky
05b3449346
kubeadm: Add etcd client unit tests 2023-05-08 13:35:03 -07:00
Daniel Lipovetsky
fc1b228779
kubeadm: Use internal etcd client through an interface 2023-05-08 13:35:03 -07:00
SataQiu
b4560f9e57 kubeadm: fix a bug where file copy(backup) could not be executed correctly on Windows platform during upgrade 2023-05-08 22:17:32 +08:00
Kubernetes Prow Robot
50ce134595
Merge pull request #117835 from pacoxu/kubeadm-crictl
kubeadm: fix crictl pull using wrong flag, use -i and -r
2023-05-06 09:31:15 -07:00
Kubernetes Prow Robot
98cf297e57
Merge pull request #117391 from catandcoder/master
fix doc mismatch
2023-05-06 08:35:17 -07:00
kkkkun
c56839c0a1 etcd: Update version to 3.5.8
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-05-06 17:29:47 +08:00
Paco Xu
64f2fe2357 kubeadm: fix crictl pull using wrong flag, use -i and -r 2023-05-06 14:50:21 +08:00
Stephen Kitt
4c83aae2cc
kubeadm: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-05-01 09:17:50 +02:00
Kubernetes Prow Robot
bc872028ab
Merge pull request #117660 from pacoxu/UpgradeAddonsBeforeControlPlane
kubeadm: add deprecated FG UpgradeAddonsBeforeControlPlane
2023-04-29 20:50:17 -07:00
Kubernetes Prow Robot
9924dc65b7
Merge pull request #117614 from chendave/multi_cri
kubeadm: fix unit test failure on node with multiple cri endpoints
2023-04-28 01:30:16 -07:00
Dave Chen
2572a43034 kubeadm: fix unit test failure on node with multiple cri endpoints
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-04-28 15:00:16 +08:00
Paco Xu
c6f4bee98d kubeadm: add deprecated FG UpgradeAddonsBeforeControlPlane 2023-04-28 13:55:46 +08:00
Kubernetes Prow Robot
78b56ce16d
Merge pull request #116570 from SataQiu/fix-kubeadm-20230314
kubeadm: support upgrade coredns and kube-proxy addons after all the control plane instances have been upgraded
2023-04-27 01:44:26 -07:00
SataQiu
170d5ef9fa code cleanup for kubeadm 2023-04-26 23:51:39 +08:00
SataQiu
e3d84aa93c kubeadm: add the experimental (alpha) feature gate UpgradeAddonsAfterControlPlane that supports upgrade coredns and kube-proxy addons after all the control plane instances have been upgraded 2023-04-25 22:12:50 +08:00
Kubernetes Prow Robot
c0804231b9
Merge pull request #117521 from nberlee/fix-coredns-rbac
remove nodes resource from CoreDNS RBAC manifest
2023-04-24 10:57:13 -07:00
Kubernetes Prow Robot
b35ffd1dcb
Merge pull request #113969 from Octopusjust/k8s-pr11
Add test for cmd/kubeadm/app/phases/upgrade/compute.go
2023-04-24 02:45:01 -07:00
SataQiu
3469bb05db kubeadm: fix unit test panic for TestNewResetData 2023-04-22 17:02:34 +08:00