Commit Graph

4783 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
5e2ad84f67 Merge pull request #134906 from carlory/fix-kubeadm-3229
kubeadm: added container runtime version check to preflight
2025-11-02 23:36:04 -08:00
Kubernetes Prow Robot
299a4fc2d2 Merge pull request #134847 from prometherion/feat/kubeadm-dns-signature
refactor(kubeadm): including dns addon version to signature
2025-10-31 03:52:05 -07:00
carlory
b3415bfdfe kubeadm: added container runtime version check to preflight
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-10-31 09:51:01 +08:00
Kubernetes Prow Robot
0517fc4126 Merge pull request #134866 from neolit123/1.35-kubeadm-drop-etcd-extra-versions
kubeadm: improve the etcd version mapping
2025-10-27 12:31:42 -07:00
Dario Tranchitella
65dcb4ce2c refactor(kubeadm): including dns addon version to signature
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-10-27 10:06:23 +01:00
Kubernetes Prow Robot
ec5425a6ef Merge pull request #134744 from neolit123/1.35-update-system-validators-to-v1.12.0
vendor: update system-validators to v1.12.1
2025-10-24 13:07:40 -07:00
Lubomir I. Ivanov
294ff15342 kubeadm: improve the etcd version mapping
For historic reasons kubeadm kept track of a skew of 2+
etcd version in a map in the constants.go file.

This is really not required because kubeadm supports only
2 version of etcd mapped to two Kubernetes versions,
which are essentially the control plane versions.

Refactor the constants.go map to only include 2 versions.
Make sure that's reflected in a unit test.

Instead of pinning the versions as literal numbers,
start using the version we get on build time.

Adapt various unit tests and functions to allow this change
to work, since during unit tests we need actual values
and the build versions are not populated. This is achieved
by requiring the functions to accept a map[uint8]string
used for testing.
2025-10-24 20:54:22 +02:00
Kubernetes Prow Robot
60e1f61a63 Merge pull request #133511 from BenTheElder/no-md5
eliminate md5 usage, block new usage
2025-10-24 10:59:35 -07:00
Lubomir I. Ivanov
c403fd4481 kubeadm: validate the KubeletVersion for cgroups v1
By using k8s.io/system-validators v1.12.1 a KubeletVersion
can be passed to the CgroupsValidator. The library
can then decide if to throw an error or a warning.

An error is thrown if the version is >= 1.35.

During upgrade pass a KubeletVersion that is with MINOR+1
to account for the target upgrade version. That is just
an assumption that the user will upgrade the kubelet too,
but it is better to throw an error for this
common use case instead of just a warning that is seen
after the upgrade command has finished.
2025-10-24 11:14:58 +02:00
Kubernetes Prow Robot
0bb040288a Merge pull request #134781 from neolit123/1.35-removete-WaitForAllControlPlaneComponents-fg
kubeadm: remove the GA WaitForAllControlPlaneComponents FG
2025-10-22 18:46:39 -07:00
Lubomir I. Ivanov
c49bdda383 kubeadm: remove the GA WaitForAllControlPlaneComponents FG
The kubeadm specific FG WaitForAllControlPlaneComponents
went GA and was locked enabled by default in 1.34.

In 1.35 it can be removed.
2025-10-22 17:14:02 +02:00
joshjms
3fbd1a1787 etcd: bump etcd to v3.5.24 for k8s v1.32, v1.33, v1.34
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-22 22:38:57 +08:00
Lubomir I. Ivanov
38373335cd kubeadm: adjust the etcd version map for release 1.35
Remove 1.31, add 1.35.
Also, add a note that there are a couple of variables
that must be updated as well.
2025-10-22 12:28:19 +02:00
Benjamin Elder
e0df6b178a migrate kubeadm static pod hashing to fnv-1a
128bit fnv-1a should be drop-in for md5 while being fast and non-obsolete
for non-cryptographic purposes.
2025-10-21 15:25:11 -07:00
Lubomir I. Ivanov
0613fdeccb kubeadm: add missing cluster-info context validation
When retrieving the cluster-info CM, ensure the cluster pointed
out by the current context in the kubeconfig is validated.

Add unit test for the above.

Make the function GetClusterFromKubeConfig() to return various
errors. Handle the errors on call sites. Add unit tests
for the update.

The above changes prevent panics when the users has manually
edited and malformed the kubeconfig in the cluster-info CM.
2025-10-20 11:58:58 +02:00
joshjms
51fc3c744a bump etcd to v3.5.23 for release v1.31, v1.32, and v1.33
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-18 02:10:21 +08:00
Jordan Liggitt
39d37a1e92 Remove invalid SAN certificate construction 2025-10-13 10:27:22 -07:00
Benjamin Elder
ced2a40b9e kubeadm preflight checks: fix host URL construction 2025-10-13 10:27:22 -07:00
Kubernetes Prow Robot
095b9d6045 Merge pull request #134433 from neolit123/1.35-show-wait-control-plane-errors-more-verbosely
kubeadm: print errors during control-plane-wait retries
2025-10-13 08:13:43 -07:00
Lubomir I. Ivanov
52c734f1e6 kubeadm: print errors during control-plane-wait retries
While waiting for control plane components, the errors during
retries are not shown in higher klog verbosity. Show them
for level 5.
2025-10-13 14:14:37 +02:00
Kubernetes Prow Robot
c8fb7c9174 Merge pull request #134524 from HirazawaUi/revert-134178
Revert "Merge pull request #134178 from HirazawaUi/remove-RootlessControlPlane“
2025-10-10 20:42:59 -07:00
Kubernetes Prow Robot
27cfc5b4d5 Merge pull request #133778 from carlory/kubeadm-cleanup-pod-infra-container-image
Remove the --pod-infra-container-image flag from kubeadm and cluster/gce
2025-10-10 19:48:58 -07:00
HirazawaUi
7b4d4f72c9 fix lint error 2025-10-10 22:35:03 +08:00
HirazawaUi
d6dec0b345 Revert "Merge pull request #134178 from HirazawaUi/remove-RootlessControlPlane"
This reverts commit fce5a08b92, reversing
changes made to d39b162163.
2025-10-10 18:36:42 +08:00
carlory
400f8eccc5 Remove the --pod-infra-container-image flag from kubeadm
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-10-10 16:54:42 +08:00
Kubernetes Prow Robot
4db43d1321 Merge pull request #134251 from joshjms/update-etcd-3.6.5
etcd: Update etcd to v3.6.5
2025-10-03 07:00:58 -07:00
joshjms
070d4c1846 bump etcd to v3.6.5
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-03 18:19:15 +08:00
Lubomir I. Ivanov
b6afe986c6 kubeadm: rework the FetchInitConfigurationFromCluster node flags
The newControlPlane flag has been historically problematic, since
it implies that the function FetchInitConfigurationFromCluster
cannot handle the cases where a node is worker node but
we still want to fetch its NodeRegistrationOptions conditionally,
in cases such as "upgrade node" for workers.

To fix this issue, replace the flag newControlPlaneNode with
two new flags getNodeRegistration and getAPIEndpoint.

If getNodeRegistration is true, we fetch the NRO, and if
getAPIEndpoint is true, we fetch the API endpoint for
that node.

Additionally, rename skipComponentConfigs to getComponentConfigs
for consistency and flip its value accordingly everywhere.
2025-09-29 19:58:56 +02:00
Lubomir I. Ivanov
bd075eb98c kubeadm: use JoinHostPort in WaitControlPlaneClient
Using naive string concat with ":" does not work for IPv6.
Apply the fix to WaitForKubelet as well.
2025-09-25 19:11:10 +02:00
Lubomir I. Ivanov
0010d3992a kubeadm: ensure waiting for apiserver uses a local client
When waiting for the kube-apiserver to report 'ok'
in the 'init' and 'join' phase 'wait-control-plane', a client
constructed from the 'admin.conf' is used. In the case of the
kube-apiserver, the discovery client is used so that
anonymous-auth works. But if 'admin.conf' is used as is,
it would point to the CPE and not the LAE.

Implement a new method WaitControlPlaneClient() for both
init.go and join.go that patches the 'Server' field in the
loaded v1.Config to point to the LAE, before constructing
a client set and using it in the kube-apiserver waiter.
2025-09-25 14:43:45 +02:00
hoteye
1e4e6e10c1 Use context.Background() directly in kubeadm polling API calls
Replace context.TODO() and poll timeout context propagation with direct
context.Background() calls to prevent timeout errors from masking actual
API errors. Affects discovery/file.go, phases/upgrade/health.go, and
util/apiclient/wait.go for consistent error reporting.
2025-09-22 21:37:27 +08:00
Kubernetes Prow Robot
fce5a08b92 Merge pull request #134178 from HirazawaUi/remove-RootlessControlPlane
Kubeadm: Remove RootlessControlPlane feature gate
2025-09-21 09:00:12 -07:00
HirazawaUi
12db1e28dc remove unused file 2025-09-21 00:35:54 +08:00
HirazawaUi
15b16e0090 Remove RootlessControlPlane feature gate 2025-09-20 22:37:56 +08:00
Lubomir I. Ivanov
9d4b91dbd8 kubeadm: cleanup after ControlPlaneKubeletLocalMode 2025-09-18 18:37:23 +02:00
Lubomir I. Ivanov
56a4306fed kubeadm: graduate ControlPlaneKubeletLocalMode to GA 2025-09-17 15:02:00 +02:00
杨朱 · Kiki
8817dd6529 Update cmd/kubeadm/app/cmd/upgrade/node.go
Co-authored-by: Bing Hongtao <695097494plus@gmail.com>
2025-09-15 20:51:52 +08:00
carlory
5dac4ee169 Improve dry-run error messages for clarity 2025-09-15 09:56:13 +08:00
carlory
97cd1c2408 replace fmt.Printf with fmt.Fprintf
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-09-11 16:43:46 +08:00
carlory
96463c1e9a kubeadm: fix the KUBEADM_UPGRADE_DRYRUN_DIR environment variable doesn't work forthe upgrade phase when it writes kubelet config files to disk
Signed-off-by: carlory <baofa.fan@daocloud.io>
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2025-09-11 15:57:47 +08:00
Kubernetes Prow Robot
a8905a154b Merge pull request #133179 from nmn3m/fix-strings-title
Replace deprecated strings.Title with cases.Title
2025-09-09 05:53:30 -07:00
HirazawaUi
8118636321 Close container runtime connections after use 2025-09-06 14:42:36 +08:00
Nour
72847ee1f7 Replace deprecated strings.Title with cases.Title 2025-08-30 18:16:59 +03:00
Kubernetes Prow Robot
546519987d Merge pull request #132288 from thevilledev/chore/coredns-v1.12.2
chore: update CoreDNS to v1.12.3
2025-08-28 06:55:10 -07:00
Kubernetes Prow Robot
52d089e653 Merge pull request #133667 from neolit123/1.34-clarify-some-api-fields
kubeadm: clarify the comments for a few API fields
2025-08-27 20:24:14 -07:00
Kubernetes Prow Robot
4f0ce131a3 Merge pull request #133513 from tom1299/fix_missing_controlplanehealthcheck
Add missing conversion for timeoutForControlPlane
2025-08-27 18:30:31 -07:00
Lubomir I. Ivanov
16d4f9ea1f kubeadm: clarify the comments for a few API fields
- Make it clear that FeatureGates are kubeadm-specific
- Add note that custom etcd image results in etcd upgrade skip
- Explain how is ClusterName is used
2025-08-23 16:24:57 +02:00
tom1299
b46a5cceef Fix missing control plane health check timeout 2025-08-19 13:49:02 +02:00
Ville Vesilehto
aa819af85a chore: update CoreDNS to v1.12.3
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2025-08-13 08:52:10 +03:00
SataQiu
d959186056 kubeadm: simplify error handling in getAPIEndpointWithRetry 2025-08-01 11:52:55 +08:00