Commit Graph

4428 Commits

Author SHA1 Message Date
carlory
a23e278d15 Graduate the flag for structural output --experimental-output to just --output 2024-04-19 16:22:45 +08:00
Kubernetes Prow Robot
0e39ca84dc Merge pull request #124375 from neolit123/1.31-remove-experimental-from-rootfs
kubeadm: remove the EXPERIMENTAL description from --rootfs
2024-04-18 13:05:35 -07:00
Kubernetes Prow Robot
c4bce63d98 Merge pull request #124374 from neolit123/1.31-remove-experimental-description-of-download-certs
kubeadm: remove the EXPERIMENTAL tag of the download-certs phase
2024-04-18 08:49:39 -07:00
Kubernetes Prow Robot
6bb968c4d2 Merge pull request #124373 from neolit123/1.31-remove-deprecated-update-status-phase
kubeadm: remove the deprecated "update-status" phase of "join"
2024-04-18 07:48:23 -07:00
Kubernetes Prow Robot
64f76b603a Merge pull request #124186 from HirazawaUi/remove-unused-func
[kubeadm]: remove kubeadm unused function
2024-04-18 06:31:30 -07:00
Lubomir I. Ivanov
142e077bcb kubeadm: remove the EXPERIMENTAL description from --rootfs
The global kubeadm --rootfs flag is now considered
non-experimental.
2024-04-18 15:54:42 +03:00
Lubomir I. Ivanov
f309a0c7a6 kubeadm: remove the EXPERIMENTAL tag of the download-certs phase
The phase was tagged as EXPERIMENTAL 5+ years ago.
2024-04-18 15:46:34 +03:00
Lubomir I. Ivanov
917c8d67c5 kubeadm: remove the deprecated "update-status" phase of "join"
The phase has been deprecated and a NO-OP for 3+ years.
2024-04-18 15:40:08 +03:00
Kubernetes Prow Robot
e6efba3380 Merge pull request #124361 from neolit123/1.31-stop-mounting-etc-pki
kubeadm: don't mount /etc/pki for apiserver and KCM
2024-04-18 05:27:59 -07:00
Lubomir I. Ivanov
9c156218cc kubeadm: don't mount /etc/pki for apiserver and KCM
According to kubeadm repo ticket 1665, /etc/pki
can contain subdirectories with private keys on some distros.
Avoid mounting the entire /etc/pki and mount /etc/pki/ca-trust
and /etc/pki/tls/certs instead. These directories are mounted
as an extra locations which can be used to search
for additional system CAs.
2024-04-18 12:33:18 +03:00
Kubernetes Prow Robot
f3e7e008a4 Merge pull request #124038 from SataQiu/fix-kubeadm-20240325
kubeadm: stop storing the ResolverConfig in the global KubeletConfiguration and instead set it dynamically for each node
2024-04-18 02:11:29 -07:00
Kubernetes Prow Robot
ab91dd6905 Merge pull request #123842 from my-git9/upgrade-fds
kubeadm: increase ut converage for config/upgradeconfiguration
2024-04-18 01:04:12 -07:00
Kubernetes Prow Robot
56b39eab7c Merge pull request #119436 from claudiubelu/unittests-9
unittests: Fixes unit tests for Windows (part 9)
2024-04-17 22:51:32 -07:00
HirazawaUi
4a4a04fa74 remove kubeadm unused function 2024-04-04 23:36:00 +08:00
carlory
363fee59e4 fix panic with SIGSEGV in kubeadm certs check-expiration 2024-04-01 11:09:53 +08:00
Claudiu Belu
c2dfcf1e34 unittests: Fixes unit tests for Windows (part 9)
Currently, there are some unit tests that are failing on
Windows due to various reasons:

- time.Now() is not as precise on Windows, which means that
  2 consecutive calls may return the same timestamp.
- Different "File not found" error messages on Windows.
- The default Container Runtime URL scheme on Windows is npipe, not unix.
2024-03-26 13:42:50 +00:00
SataQiu
c1f2167803 kubeadm: stop storing the ResolverConfig in the global KubeletConfiguration and instead set it dynamically for each node 2024-03-25 18:26:46 +08:00
xin.li
a4fe397ebd kubeadm: increase ut converage for config/upgradeconfiguration
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-03-11 13:27:24 +08:00
Kubernetes Prow Robot
9d39ce04fd Merge pull request #123595 from neolit123/1.30-add-timeouts-upgradeconfig
kubeadm: add timeouts to v1beta4.UpgradeConfiguration
2024-03-04 01:16:44 -08:00
Lior Lieberman
db115ca929 [kubeadam] do not set authorization-mode in api server when authorization-config is provided 2024-03-03 14:43:47 +00:00
Kubernetes Prow Robot
7c11cc9cfc Merge pull request #123578 from carlory/fix-kubeadm-494
kubeadm: print all the kubelets and nodes that need to be upgraded on "upgrade plan"
2024-03-03 01:46:03 -08:00
carlory
22adf221a1 print nodename 2024-03-03 11:03:29 +08:00
Lubomir I. Ivanov
99313bea88 kubeadm: remove constants for mirror pod timeout
StaticPodMirroringTimeout and StaticPodMirroringRetryInterval
are use for just an API call to get Pods(). The already existing
constants.KubernetesAPICallRetryInterval
and kubeadmapi.GetActiveTimeouts().KubernetesAPICall.Duration
can be used for that instead.
2024-03-01 13:04:08 +02:00
Lubomir I. Ivanov
ded6354a8f kubeadm: add Timeouts struct to v1beta4.UpgradeConfiguration
Follow the same process of adding the Timeouts struct
to UpgradeConfiguration similarly to how it was done for
other API Kinds.

In the Timeouts struct include one new timeout:
- UpgradeManifests
2024-03-01 13:04:08 +02:00
Kubernetes Prow Robot
d8122df1b7 Merge pull request #123555 from neolit123/1.30-fix-apiserver-authz-arg-defaulting
kubeadm: fix a bug in defaulting apiserver "authorizaion-mode"
2024-02-29 09:49:08 -08:00
Kubernetes Prow Robot
03f24068da Merge pull request #123341 from neolit123/1.30-health-check-all-cp-components
kubeadm: introduce the WaitForAllControlPlaneComponents feature gate
2024-02-29 05:05:42 -08:00
calvin
466019b1b2 kubeadm: implementation of API types
Signed-off-by: calvin <wen.chen@daocloud.io>
Co-authored-by: Dave Chen <dave.chen@arm.com>
2024-02-29 13:14:21 +08:00
Lubomir I. Ivanov
5f7c36a4e9 kubeadm: fix a bug in default apiserver "authorizaion-mode"
When the flag is defaulted before writing the apiserver manifest,
the input "cfg" object should not be mutated.

If the "cfg" is mutated, the upload ClusterConfiguration
to the cluster will include the defaulting, which is not
needed.
2024-02-28 14:32:28 +02:00
carlory
ea69a5ea98 in the new output API output.kubeadm.k8s.io/v1alpha3 modify the UpgradePlan structure to include a list of multiple available upgrades. 2024-02-27 15:05:29 +08:00
Kubernetes Prow Robot
a58221c104 Merge pull request #123492 from carlory/fix-kubeadm-494-1
Replace fmt.Print with printer in upgrade plan code and fix configVersions are not printed when output is json or yaml
2024-02-25 13:47:31 -08:00
Kubernetes Prow Robot
821c0ef61e Merge pull request #123489 from yxxhero/print_etcd_ready_status
feat: print etcd ready status
2024-02-25 07:42:03 -08:00
carlory
fb3ab53822 Replace fmt.Print with printer in upgrade plan code and fix configVersions are not printed when output is json or yaml 2024-02-25 21:58:18 +08:00
yxxhero
e6d6d8e14c feat: print etcd ready status
Signed-off-by: yxxhero <aiopsclub@163.com>
2024-02-25 20:56:47 +08:00
SataQiu
75238e592d kubeadm: remove bridge-nf-call-iptables and bridge-nf-call-ip6tables preflight checks since not all the network implementations require this setting 2024-02-23 15:37:42 +08:00
Kubernetes Prow Robot
786510947b Merge pull request #123406 from SataQiu/fix-20240221
kubeadm: fix the invalid cross-device link bug during upgrade
2024-02-22 06:12:58 -08:00
Kubernetes Prow Robot
ec58e1f2fc Merge pull request #123372 from carlory/fix-kubeadm-494
kubeadm certs check-expiration support json/yaml output
2024-02-22 01:07:52 -08:00
carlory
0c4df64092 fix api 2024-02-22 10:39:30 +08:00
SataQiu
f3cb5059a7 kubeadm: fix a bug during kubeadm upgrade, where it is not possible to mount a new device and create a symbolic link for /etc/kubernetes (or a sub-directory) so that kubeadm stores its information on the mounted device 2024-02-22 09:42:57 +08:00
carlory
ecaf269d3c add new test cases to test json output when fetch kubeadm config from server 2024-02-21 21:26:12 +08:00
carlory
98437cb4be fix json output when fetch kubeadm config from server 2024-02-21 18:21:33 +08:00
carlory
43ba0bd53b kubeadm certs check-expiration support json/yaml output
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
Co-authored-by: Paco Xu <paco.xu@daocloud.io>
2024-02-21 01:11:55 +08:00
Lubomir I. Ivanov
c29450eb00 kubeadm: apply retries to all API calls in idempotency.go
The idempotency.go (perhaps not so accurately named) contains
API calls that kubeadm does against an API server using client-go.

Some users seem to have unstable setups where for unknown reasons
the API server can be unavailable or refuse to respond as expected.

Use PollUntilContextTimeout in all exported functions to ensure
such API calls are all retry-able.

NOTE: The context passed to PollUntilContextTimeout is not propagated
in the polled function. Instead the poll function creates it's own
context 'ctx := context.Background()', this is to avoid
breaking expectations on the side of the callers, that expect
a certain type of error and not "context timeout" errors.

Additional changes:
- Make all context.TODO() -> context.Background()
- Update all unit tests and make sure during testing the retry
interval and timeout are short. Test coverage of idempotency.go
is at ~97%.
- Remove the TestMutateConfigMapWithConflict test. It does not
contribute much, because conflict handling is done at the API,
server side, not on the side of kubeadm. This simulating this is not
needed.
2024-02-18 13:14:32 +02:00
Lubomir I. Ivanov
7db7222592 kubeadm: introduce the WaitForAllControlPlaneComponents feature gate
WaitForAllControlPlaneComponents is a new feature gate
that can be used to tell kubeadm to wait for all control plane
components and not only kube-apiserver.

- Add the Waiter function WaitForControlPlaneComponents
that waits for all CP components in parallel. Uses the regular
healthz endpoint for checks of status 200.
- Add a new experimental phase to kubeadm join called "wait-control-plane".
A similar phase exists for kubeadm init.
2024-02-16 17:33:38 +02:00
Jordan Liggitt
4ae2b3f75f Revert "kubeadm: increase ut coverage for app/util"
This reverts commit 36904475db.
2024-02-12 20:13:30 -05:00
xin.li
36904475db kubeadm: increase ut coverage for app/util
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-02-09 16:24:54 +08:00
Kubernetes Prow Robot
e7d84c9f08 Merge pull request #123171 from vrutkovs/kubeadm-issue3014
kubeadm: use current-context when validating kubelet kubeconfig
2024-02-07 09:04:06 -08:00
bzsuni
658e3308f3 etcd: Update to version 3.5.12
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-02-07 21:16:08 +08:00
Vadim Rutkovsky
fc610f0941 kubeadm: use current-context when validating kubelet kubeconfig
During initialization `kubeadm init` creates kubelet.conf with
specified name and during finalize phase validates that
this kubeconfig is not corrupted by checking for presence of specific
authinfo

However:
* kubelet doesn't require a specific name for this context
* in external CA mode this kubeconfig can be created outside of
  `kubeadm init`

This change updates kubeadm finalize stage to avoid overly strict
context check.
2024-02-07 14:14:13 +01:00
Kubernetes Prow Robot
dd301d0f23 Merge pull request #123118 from my-git9/idempotency-ut
kubeadm: increase ut coverage for apiclient/idempotency
2024-02-05 14:08:26 -08:00
Kubernetes Prow Robot
8cbe59308c Merge pull request #122786 from HirazawaUi/remove-kubeadm-useless-code
kubeadm: remove code to be removed in 1.30
2024-02-05 07:21:29 -08:00