Commit Graph

4819 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
997ca903d8 Merge pull request #136127 from carlory/fix-3279
kubeadm: fix a bug where kubeadm upgrade is failed if the content of the `kubeadm-flags.env` file is `KUBELET_KUBEADM_ARGS=""`
2026-01-12 15:24:10 +05:30
carlory
f96472556c kubeadm: fix a bug where kubeadm upgrade is failed if the content of the kubeadm-flags.env file is KUBELET_KUBEADM_ARGS=""
Signed-off-by: carlory <baofa.fan@daocloud.io>
2026-01-12 10:09:05 +08:00
LoginovIlia
bfe4b7ecd7 kubeadm: switch tests to NewClientset 2026-01-09 04:30:53 -05:00
Kubernetes Prow Robot
caf5cdc58b Merge pull request #135148 from neolit123/1.35-add-deprecated-api-flag-to-config-validate
kubeadm: add --allow-deprecated-api to 'config validate'
2026-01-04 18:30:37 +05:30
Kubernetes Prow Robot
a1f6c4171f Merge pull request #135971 from DEVMANISHOFFL/fix-kubeadm-reset-crash
fix(kubeadm): prevent nil pointer panic in reset command
2025-12-30 21:56:35 +05:30
devmanishofficial
ecf7e6d41f fix(kubeadm): prevent nil pointer panic in reset command
Signed-off-by: devmanishofficial <devmanishofficial@gmail.com>
2025-12-30 15:53:10 +05:30
bo.jiang
e0d4e7075b Optimize slice initialization in kubeadm
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-12-30 16:42:36 +08:00
Kubernetes Prow Robot
9bd81471eb Merge pull request #135805 from humblec/etcd-3.6.7
etcd: Update etcd to v3.6.7
2025-12-22 16:28:39 -08:00
Kubernetes Prow Robot
3bde8d89a4 Merge pull request #135807 from carlory/fix-kubeadm-3108
kubeadm: remove --pod-infra-container-image flag from the unwantedFlags list
2025-12-21 20:32:30 -08:00
Kubernetes Prow Robot
589e695797 Merge pull request #135701 from neolit123/1.36-remove-special-flag-handling-for-older-etcd
kubeadm: remove the usage of 2 deprecated flags for etcd < 3.6.0
2025-12-19 09:30:42 -08:00
Kubernetes Prow Robot
032cd00f4c Merge pull request #135400 from neolit123/1.36-dont-sort-extra-args
kubeadm: do not sort extraArgs alpha-numerically
2025-12-19 09:30:34 -08:00
Kubernetes Prow Robot
5262149cd6 Merge pull request #135742 from HirazawaUi/promote-4656-to-ga
Kubeadm: Graduate NodeLocalCRISocket feature gate to GA
2025-12-19 02:10:32 -08:00
HirazawaUi
cbb227b0e4 promote NodeLocalCRISocket to GA 2025-12-19 09:57:59 +08:00
Kubernetes Prow Robot
430fef557f Merge pull request #135531 from pohly/golangci-lint-bump
golangci-lint: bump to v2.7.1
2025-12-18 07:55:18 -08:00
Humble Devassy Chirammal
8dc8edf49b etcd: Update etcd to v3.6.7
ETCD 3.6.7 has some critical bug fixes
https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.6.md

Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2025-12-18 19:05:14 +05:30
HirazawaUi
642d96dcb4 clean up unused constant 2025-12-18 19:45:38 +08:00
Kubernetes Prow Robot
34430b9127 Merge pull request #135589 from neolit123/1.36-revert-dynamic-etcd-map
kubeadm: revert to using a static list of etcd versions
2025-12-18 03:21:16 -08:00
Patrick Ohly
ad79e479c2 build: remove deprecated '// +build' tag
This has been replaced by `//build:...` for a long time now.

Removal of the old build tag was automated with:

    for i in $(git grep -l '^// +build' | grep -v -e '^vendor/'); do if ! grep -q '^// Code generated' "$i"; then sed -i -e '/^\/\/ +build/d' "$i"; fi; done
2025-12-18 12:16:21 +01:00
Kubernetes Prow Robot
bb52ae5e24 Merge pull request #135776 from neolit123/1.36-always-retry-on-patch-node-errors
kubeadm: always retry Patch() Node API calls
2025-12-18 02:11:01 -08:00
carlory
e3c0292431 kubeadm: remove --pod-infra-container-image flag from the unwantedFlags list
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-12-18 15:52:04 +08:00
Lubomir I. Ivanov
4d11e21fc9 kubeadm: always retry Patch() Node API calls
The PatchNodeOnce function has historically exited early
in scanarious when we Get a Node object, but the next Patch
API call on the same Node object fails. This can happen
in setups that are under a lot of resource pressure
or different network timeout scenarious.

Instead of exiting early and allow listing certain errors,
always retry on any Patch error. This aligns with the
general idea that kubeadm retries *all* API calls.
2025-12-16 19:09:01 +01:00
Lubomir I. Ivanov
df44db129b kubeadm: remove the FG ControlPlaneKubeletLocalMode
The FG went GA in 1.35. It can be removed in 1.36.
2025-12-16 17:32:50 +01:00
Lubomir I. Ivanov
08a339bdd7 kubeadm: do not use deprecated etcd flags
In local.go there are a couple of flags that changed their
format for etcd > 3.6.0. kubeadm 1.36 no longer supports
deploying a k8s version that maps to etcd < 3.6.0, thus
the branching and the deprecated flags can be removed.
2025-12-10 14:33:31 +01:00
Lubomir I. Ivanov
05c4e3febe kubeadm: revert to using a static list of etcd versions
The introduction of dynamic keys in the etcd version
map in constants.go introduced a couple of problems:

1. The size of the map could no longer be unit tested
because at UT runtime there was only one key "0".

2. Once a new k8s release branch is cut the version map
has mismatched versions. The latest k8s version mapped to the
future prerelease alpha (placeholder), the previous was the current
WIP release version and the oldest version in the map is the
current stable. This introduces a undesider shift of versions
where we are applying the wrong version to the current WIP
release unless an contrubutor PRs it.

The old static approach on the other hand is safer because
it hardcodes the versions, and the utility function
EtcdSupportedVersion() ensures that we get a relevant etcd
version even if the input k8s MINOR key is out of bonds for the map.

- Revert to using static version in the map.
- Revert the unit test TestEtcdSupportedVersionLength.
- Add additional comments over the map.
2025-12-08 13:40:11 +01:00
bzsuni
2c811fdd3a etcd: Update etcd to v3.6.6
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2025-12-08 05:37:15 +00:00
Angelos Kolaitis
03066850f6 remove TestEtcdSupportedVersionLength, no longer relevant
Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
2025-12-03 13:19:09 +02:00
Angelos Kolaitis
aa54ffa485 fix etcd versions after rotation
Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
2025-12-03 13:15:49 +02:00
Angelos Kolaitis
4a944d1a3f add skew -2 version in SupportedEtcdVersion
Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
2025-12-03 13:11:10 +02:00
Lubomir I. Ivanov
4c24a498fa kubeadm: do not sort extraArgs alpha-numerically
If the user has provided extraArgs with an order that has
significance (e.g. --service-account-issuer for kube-apiserver),
kubeadm will correctly override any base args, but will end up
sorting the entire resulting list, which is not desired.

Instead, only sort the base arguments and preserve the order
of overrides provided by the user.
2025-11-24 12:59:57 +01:00
Kubernetes Prow Robot
f38a61181c Merge pull request #133968 from yashsingh74/bump-coredns-1.12.4
Update coredns to v1.13.1
2025-11-06 20:38:54 -08:00
Kubernetes Prow Robot
37934c5c26 Merge pull request #134890 from SataQiu/kubeadm-support-etcd-http-endpoints
kubeadm: support specifying HTTP endpoints for external etcd, allowing users to separate gRPC and HTTP traffic for etcd
2025-11-05 22:48:50 -08:00
Lubomir I. Ivanov
e5665154f7 kubeadm: add --allow-deprecated-api to 'config validate'
The command can have this additional flag so that a warning
is printed or not printed when a deprecated API is validated.

Additionally, this commit fixes missing UpgradeConfiguration
validation and strict errors. By default we call:
  documentMapToUpgradeConfiguration(gvkmap, false, false, false)

so there is no change in behavior outside of
'config migrate/validate'.
2025-11-05 19:14:22 +02:00
HirazawaUi
79dc7908ff Fix potential dryrun failure when NodeLocalCRISocket reaches GA 2025-11-05 23:46:03 +08:00
SataQiu
a079e1ed25 kubeadm: add 'HTTPEndpoints' field to 'ClusterConfiguration.Etcd.ExternalEtcd' that can be used to configure the HTTP endpoints for etcd communication 2025-11-04 22:12:19 +08:00
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