Commit Graph

4654 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
b92b3d33e2 Merge pull request #129644 from neolit123/1.33-update-text-at-end-of-reset
kubeadm: improve message in 'reset'
2025-01-18 06:38:41 -08:00
Kubernetes Prow Robot
fcc1e9002a Merge pull request #129450 from carlory/kubeadm-exec-check
kubeadm: update preflight check
2025-01-18 06:38:34 -08:00
Kubernetes Prow Robot
ab54e442c6 Merge pull request #128773 from bzsuni/bz/etcd/update/3.5.17
Update etcd from v3.5.16 to v3.5.17
2025-01-16 21:22:34 -08:00
Lubomir I. Ivanov
dac6b34a61 kubeadm: improve message in 'reset'
Link to the k8s.io website page for 'kubeadm reset', which
should have the instructions on how to perform manuall cleanups.
2025-01-16 10:15:04 +02:00
Kubernetes Prow Robot
e384893030 Merge pull request #129594 from neolit123/1.33-fix-preflight-pull-sandbox-error
kubeadm: remove misplaced error during image pull
2025-01-13 21:02:38 -08:00
Lubomir I. Ivanov
2f4bd13fe5 kubeadm: remove misplaced error during image pull
During preflight when an image is pulled, if the sandbox image
check returns an error, the same error later blocks the actual
image pull.
2025-01-13 19:29:39 +02:00
Lubomir I. Ivanov
a92297f1a7 kubeadm: remove the GA EtcdLearnerMode FG 2025-01-13 16:44:56 +02:00
Kubernetes Prow Robot
afc4647816 Merge pull request #129561 from mozillazg/patch-1
kubeadm: fix a wrong comment
2025-01-11 06:38:32 -08:00
Huang Huang
018ee41e6f kubeadm: fix a wrong comment
apply commit suggestion

Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2025-01-11 11:28:45 +00:00
bzsuni
fb47caa689 Update coredns to 1.12.0
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2025-01-08 03:34:41 +00:00
Paco Xu
02fbcb4e69 kubeadm: should not warn on non-detect sandbox image 2025-01-06 14:23:18 +08:00
carlory
00a7849ef9 kubeadm: add preflight check for losetup on Linux nodes
kubeadm: remove preflight check for nsenter on Linux nodes

Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-01-03 11:42:13 +08:00
Kubernetes Prow Robot
87cf098f34 Merge pull request #129452 from SataQiu/fix-20250102
kubeadm: fix a bug where the 'node.skipPhases' in UpgradeConfiguration is not respected by 'kubeadm upgrade node' command
2025-01-02 12:00:14 +01:00
bzsuni
df503e54c8 Update etcd from v3.5.16 to v3.5.17
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2025-01-02 10:20:42 +00:00
SataQiu
4c6deed07e kubeadm: fix a bug where the node.skipPhases in UpgradeNodeConfiguration is not respected by 'kubeadm upgrade node' 2025-01-02 17:44:05 +08:00
Kubernetes Prow Robot
3c229949f9 Merge pull request #129401 from pacoxu/kubeadm-upgrade-precheck
kubeadm: add kernel version check for upgrade
2025-01-02 03:50:13 +01:00
SataQiu
2fd16abbe8 kubeadm: bump supported etcd version 2024-12-31 10:11:38 +08:00
Paco Xu
2c305d71f0 kubeadm: add system verification check(including kernel version check) for upgrade 2024-12-30 18:17:56 +08:00
Lubomir I. Ivanov
b406ba5cc3 kubeadm: skip disabled addons in clusterconfig on upgrade
If an addon is disabled in the ClusterConfiguration skip it
on upgrade in the repsective subphase of 'addons'.
2024-12-28 12:20:00 +02:00
Kubernetes Prow Robot
80379db5d5 Merge pull request #129279 from HirazawaUi/remove-cri-anno
[NodeLocalCRISocket]: remove kubeadm.alpha.kubernetes.io/cri-socket annotation when kubeadm upgrade
2024-12-21 09:46:09 +01:00
HirazawaUi
7c515cd1cb remove kubeadm.alpha.kubernetes.io/cri-socket annotation when kubeadm upgrade 2024-12-21 14:57:57 +08:00
Kubernetes Prow Robot
646e7f04d9 Merge pull request #129317 from carlory/kubeadm-touch
kubeadm: remove preflight check for `touch` on Linux nodes.
2024-12-21 05:00:09 +01:00
Kubernetes Prow Robot
fab7593a29 Merge pull request #129278 from HirazawaUi/remove-kubelet-args
[NodeLocalCRISocket]:  Remove `container-runtime-endpoint` flag when kubeadm upgrade
2024-12-20 11:26:08 +01:00
carlory
4396511e43 kubeadm: removed preflight check for touch on Linux nodes.
Signed-off-by: carlory <baofa.fan@daocloud.io>
2024-12-20 11:28:30 +08:00
HirazawaUi
769e7990d6 remove container-runtime-endpoint flag when upgrade 2024-12-20 08:03:10 +08:00
Stephen Kitt
efdb735750 kubeadm: fix idempotency retain, address deprecation
CreateOrRetain is supposed to operate on an object name which isn't
necessarily the given object's name (for use in migrations), this
restores that feature.

Replace all uses of deprecated functions with their generic variants.

Providing the context externally isn't useful right now, drop it from
the new functions and use context.Background() where needed.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-12-19 14:29:09 +01:00
Stephen Kitt
db4c509e71 kubeadm: generalise CreateOrUpdate etc.
This uses generics to generalise the various CreateOrUpdate,
CreateOrRetain etc. functions. Where appropriate, the context is added
as an initial argument to the new functions.

ConfigMapMutator isn't used anywhere else, so it's dropped in favour
of the private objectMutator added in this commit.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-12-19 09:19:29 +01:00
Paco Xu
fd8a61ae1b kubeadm: update owners for v1.33 2024-12-17 17:16:39 +08:00
Kubernetes Prow Robot
e818574885 Merge pull request #129131 from pacoxu/kubeadm-iptables-check
kubeadm: remove iptables/ip/tc/ethtool binary preflight check
2024-12-14 08:14:53 +01:00
Paco Xu
39e7db9cc9 kubeadm: remove iptables/ip/tc/ethtool binary preflight check 2024-12-13 16:11:07 +08:00
Kubernetes Prow Robot
e8615e2712 Merge pull request #129054 from pohly/remove-import-name
remove import doc comments
2024-12-12 09:58:35 +01:00
Kubernetes Prow Robot
f83f78dbd5 Merge pull request #129141 from vlttnv/patch-1
Fix grammar mistake in kubeadm config v1beta4
2024-12-12 06:41:02 +00:00
Kubernetes Prow Robot
1f415b4e13 Merge pull request #129006 from kokes/kubeadm_rereading_kubeconfigs
kubeadm: Do not read kubeconfig from disk repeatedly in the init phase
2024-12-12 05:28:38 +00:00
Valentin
9bd5dc86d3 Fix grammar mistake in kubeadm config v1beta4
Fix grammar mistake in kubeadm configuration documentation - use "a YAML" instead of "an YAML" since YAML starts with a consonant sound.
2024-12-10 14:00:38 +02:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Ondrej Kokes
6f06cd6e05 Do not reload kubeconfig from disk
When `kubeadm init phase bootstrap-token` gets invoked, it reads
the kubeconfig from disk repeatedly. This is wasteful, but, more
importantly, it blocks the use of `/dev/stdin` and other sources
of data that cannot be read repeatedly.

This change introduces a new field that caches a parsed kubeconfig
and when a new clientset is requested, it is converted from
this pre-parsed kubeconfig, the code no longer reaches out to disk.
2024-11-27 16:44:51 +01:00
Abhishek Kr Srivastav
179fa16f46 Remove user privilege checks from preflight tests 2024-11-15 19:52:27 +05:30
Kubernetes Prow Robot
deecaf73eb Merge pull request #128763 from srivastav-abhishek/fix-err-string
Fixed failing UT TestWriteKubeletConfigFiles by removing privilege check and adding proper error handling
2024-11-13 18:54:47 +00:00
Abhishek Kr Srivastav
56e3c787a5 Fixed failing test by removing privilege check and some refactor
Addressed review comments
2024-11-13 23:13:33 +05:30
SataQiu
d81e8beaea kubeadm: fix a bug where upgrade dryrun can not select the network interface correctly 2024-11-13 11:54:30 +08:00
Kubernetes Prow Robot
983dd07760 Merge pull request #128031 from HirazawaUi/kep-4656
[Kubeadm] KEP-4656: Add kubelet instance configuration to configure CRI socket for each node
2024-11-06 20:09:37 +00:00
HirazawaUi
d3ea4d3d9a Implement kubeadm reset 2024-11-06 21:43:09 +08:00
HirazawaUi
c47eaa88b1 Implement kubeadm upgrade 2024-11-06 21:43:05 +08:00
Kubernetes Prow Robot
3dcad5f0db Merge pull request #128532 from neolit123/1.32-handle-custom-addreses-comp-readyz
kubeadm: use advertise address for WaitForAllControlPlaneComponents
2024-11-06 08:51:29 +00:00
HirazawaUi
12a394fcc7 Implement kubeadm join 2024-11-05 20:59:57 +08:00
HirazawaUi
16e767d915 Implement kubeadm init 2024-11-05 20:59:53 +08:00
Lubomir I. Ivanov
0cfcaa82e1 kubeadm: use advertise address for WaitForAllControlPlaneComponents 2024-11-05 09:00:38 +02:00
Kubernetes Prow Robot
6fce566781 Merge pull request #128474 from neolit123/1.32-handle-custom-addreses-comp-readyz
kubeadm: use actual addresses/ports for WaitForAllControlPlaneComponents
2024-11-02 17:19:26 +00:00
Lubomir I. Ivanov
b2741f7b1c kubeadm: use actual addresses/ports for WaitForAllControlPlaneComponents
By default check the KCM and scheduler on 127.0.0.1:<port> as that is the
defaall --bind-address kubeamd uses for these components.

For kube-apiserver take the value from APIEndpoint.AdvertiseAddress which is
dynamically detected from the host. Unless the user has passed explicitly --advertise-address
as an extra arg.

Read the <port> values for all components from the --secure-port flag
value if needed. Otherwise use defaults.

Use /livez for apiserver and scheduler. Add TODO for KCM to
switch to /livez as well.
2024-11-02 18:09:36 +02:00
Lubomir I. Ivanov
fceb39ecd2 kubeadm: ensure proper parsing of SSR username
- Split the code that tries to get node name from SSR into
a new function getNodeNameFromSSR(). Unit test the function.
- Fix error that the "system:nodes:" prefix was not trimmed.
- Fix mislearding errors around FetchInitConfigurationFromCluster.
This function performs multiple actions, and the "get node"
action can also be of type apierrors.NotFound(). This creates
confusion in the returned error in enforceRequirement during
upgrade. Fix this problem.
2024-11-01 11:42:58 +02:00