Commit Graph

4142 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
7bac0cee89
Merge pull request #118946 from SataQiu/clean-kubeadm-20230629
kubeadm: remove unused Kind and Resource functions from output API
2023-06-29 02:51:47 -07:00
Kubernetes Prow Robot
4036b6fb41
Merge pull request #118922 from champtar/kubeadm-backdate-ca
kubeadm: backdate generated CAs
2023-06-28 12:28:56 -07:00
SataQiu
24f4785e3e kubeadm: remove unused Kind and Resource functions from output API 2023-06-29 00:16:38 +08:00
SataQiu
90f82d05ce kubeadm: remove unused Kind and Resource functions from kubeadm internal API 2023-06-28 23:36:53 +08:00
Etienne Champetier
812556365b kubeadm: backdate generated CAs by 5 minutes
This allow for a small time jump backward after
certificates generation.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2023-06-28 00:12:29 -04:00
Kubernetes Prow Robot
1c32c3bd9f
Merge pull request #118866 from neolit123/1.28-add-v1beta4-to-scheme
kubeadm: add v1beta4 to scheme; add --allow-experimental-api flag
2023-06-27 08:56:44 -07:00
SataQiu
4298953c26 kubeadm: remove unused Kind and Resource functions from v1beta4 API 2023-06-26 22:11:52 +08:00
Lubomir I. Ivanov
f04484fe77 kubeadm: add the --allow-experimental-api flag to "config" commands
Add the flag --allow-experimental-api to the "config migrate" and
"config validate" commands. The flag allows validating / migrating-to
a unreleased / experimental API version.

Add a new experimentalAPIVersions map in validateSupportedVersion()
that contains v1beta4.
2023-06-26 13:50:47 +03:00
Lubomir I. Ivanov
0774f779d5 kubeadm: add v1beta4 to the kubeadm API scheme
The highest priority is still v1beta3.
2023-06-26 13:43:47 +03:00
Kubernetes Prow Robot
027ac5a426
Merge pull request #118762 from neolit123/1.28-kubeadm-add-v1beta4-boilerplate
kubeadm: add v1beta4 API boilerplate
2023-06-25 22:05:08 -07:00
Lubomir I. Ivanov
edb59e9bc7 kubeadm: move token defaulting and related constants to token package
Move the defaulting of the BootstrapToken type inside the
bootstraptoken/v1 package. This prevents an error where
codegen complains that a defaulter for the type exists in both
the kubeadm v1beta3 and v1beta4.

Adapt kubeadm code to use the defaulter function and constants
that were moved to bootstraptoken/v1.

NOTE: technically this is a breaking change for direct users of
v1beta3/SetDefaults_BootstrapToken().
2023-06-21 13:34:21 +03:00
Kubernetes Prow Robot
2d60430a16
Merge pull request #118730 from my-git9/ut-features
[UT] increase coverage ut for kubeadm/app/features
2023-06-20 07:54:36 -07:00
Lubomir I. Ivanov
eecac05871 kubeadm: add v1beta4 API boilerplate
Create v1beta4 by copying v1beta3.
2023-06-20 14:33:30 +03:00
xin.li
180c2332bf [UT] increase coverage ut for kubeadm/app/features
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-06-20 12:57:22 +08:00
Lubomir I. Ivanov
ede2ec22b6 kubeadm: drop older etcd versions from kubeadm support
- drop versions < 1.22 in the etcd map
- use 3.5.9-0 for >= 1.22 versions
- make the minimum version for external etcd 3.4.13-4 and max 3.5.9-0
- update images_test to not rely on a pinned etcd version in tests

note: the image 3.4.18-0 was never released in registry.k8s.io!
2023-06-18 15:38:53 +03:00
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