Commit Graph

904 Commits

Author SHA1 Message Date
SataQiu
d12b4d4c67 kubeadm: show a warning message when detecting that the sandbox image of the container runtime is inconsistent with that used by kubeadm 2023-02-10 14:59:40 +08:00
Kubernetes Prow Robot
6eb008620c
Merge pull request #115379 from artemvmin/serial-mkfs
Add an option to limit the number of concurrent mkfs calls
2023-02-06 18:26:58 -08:00
Kubernetes Prow Robot
561a35f358
Merge pull request #115038 from mercedes-benz/tobiasgiese/kubeadmfix-etcd-learner-join
kubeadm: fix etcd learner join
2023-02-06 02:09:01 -08:00
Artem Minyaylov
f573e14942 Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex
2023-02-04 11:05:22 -08:00
Dan Winship
f994ae2521 Move GetHostname() from k/k/pkg/util/node to k/component-helpers/node/util
In fact, this actually uses pkg/util/node's GetHostname() but takes
the unit tests from cmd/kubeadm/app/util's private fork of that
function since they were more extensive. (Of course the fact that
kubeadm had a private fork of this function is a strong argument for
moving it to component-helpers.)
2023-01-27 18:24:38 -05:00
Tobias Giese
ea46c91868 kubeadm: promote member after the static pod manifest was written
Signed-off-by: Tobias Giese <tobias.giese@mercedes-benz.com>
Co-authored-by: Christian Schlotter <christi.schlotter@gmail.com>
2023-01-16 11:11:58 +01:00
Paco Xu
cca7a205ad remove kubeadm v1beta2 support 2023-01-05 21:30:26 +08:00
Paco Xu
b3056ea9bd remove the deprecated kubeadm v1beta2 API 2023-01-04 12:19:15 +08:00
Dave Chen
fd60b9c492 kubeadm: return the output from stdout and stderr
It was just saying the copy of file failed with `exit status 1`,
no much details for what's going wrong.

Combine the stderr and stdout and show those info will be easier
for us to fix the problem.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-01-03 10:45:12 +08:00
Lubomir I. Ivanov
54b73deaca kubeadm: handle dry run GET actions from fake discovery
The kubeadm dry run client reactor code is flawed as it assumes
all invoked "get" verb actions can be casted to GetAction.
Apparently that is not the case when Discovery().ServerVersion()
and other discovery calls are made. In such cases the action
type is the bare ActionImpl.

Catch if an action can be casted to ActionImpl and construct a
GetAction from it. GetActionImpl only suppersets ActionImpl with
a Name field (empty string in this case).

Add unit test for Discovery().ServerVersion().
2022-12-21 11:49:59 +02:00
Jordan Liggitt
78cb3862f1
Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
Kubernetes Prow Robot
fdafd50085
Merge pull request #113318 from pacoxu/learner-mode
kubeadm: enable etcd's learner mode when joining etcd members
2022-12-16 21:55:41 -08:00
Paco Xu
37f5da904b kubeadm: remove nested loops for member promotion 2022-12-17 12:40:15 +08:00
Paco Xu
b3deecfb17 add etcd as learner mode and promote when fg EtcdLearnerMode is enabled
- use etcd backoff to wait; still has many warning messages
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-16 21:09:59 +08:00
Dave Chen
8c7609fbe2 kubeadm: bump to use golang generic
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-12-14 10:31:18 +08:00
Kubernetes Prow Robot
f380944261
Merge pull request #114338 from champtar/kubeadm-priority
kubeadm: set priority for "system-node-critical" Pods
2022-12-10 09:05:48 -08:00
Kubernetes Prow Robot
9e3e47f56a
Merge pull request #114176 from QuantumEnergyE/kubeadm_retry_patch_node
Retry patch when then service is unavailable or timeout.
2022-12-10 06:05:26 -08:00
Etienne Champetier
64eef3e9fa kubeadm: set priority for "system-node-critical" Pods
Priority is normally set by the admission controller when missing.
For static pods there seems to be some corner cases, as, if priority
is not explicitly set, Graceful Node Shutdown will shutdown
static pods with the other pods that have priority 0 or unset.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2022-12-07 14:19:28 -05:00
QuantumEnergyE
847a39afc0 Retry patch when then service is unavailable or timeout. 2022-11-29 23:09:31 +08:00
SataQiu
21cd660a1f kubeadm: respect user provided kubeconfig during discovery process 2022-11-24 12:29:10 +08:00
Mark Rossetti
534f052a8d
Updating pause image refernces to 3.9
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-11-14 10:24:54 -08:00
Kubernetes Prow Robot
38c659eb9f
Merge pull request #111534 from claudiubelu/unittests-7
unittests: Fixes unit tests for Windows
2022-10-24 06:30:25 -07:00
SataQiu
93ece333e6 kubeadm: print the detailed manifest info when decoding it into runtime.Object fails 2022-10-21 16:50:17 +08:00
SataQiu
d4cafe4738 kubeadm: optimize and make the usage consistent about apierrors.IsNotFound 2022-10-13 23:23:53 +08:00
SataQiu
61cd585ad2 kubeadm: remove redundant import alias and unused apiclient util funcs 2022-09-28 12:36:54 +08:00
Kubernetes Prow Robot
297a986738
Merge pull request #110941 from runzhliu/patch-1
improve the comments
2022-09-19 14:21:34 -07:00
Kubernetes Prow Robot
05f17ee5d6
Merge pull request #111076 from claudiubelu/unittests-6
unittests: Fixes cmd unit tests for Windows
2022-09-16 07:39:27 -07:00
SataQiu
de4aeecd48 kubeadm: allow RSA and ECDSA format keys in preflight check 2022-09-16 18:50:45 +08:00
B Aravind
b307321c0a
I have evaluated TODO retry remove if feasible (#112383)
Hi team, hope u all doing well.

I have checked TODO that to remove "retry" if feasible but it's important i think that it shouldn't be removed because it was used in every file on your repo.

Update idempotency.go

Update idempotency.go

Update idempotency.go
2022-09-13 22:31:00 -07:00
Kubernetes Prow Robot
2b2be7fa6b
Merge pull request #111277 from chymy/improve-kubeadm-subcommand-tips
kubeadm: improve tips of incorrect input of kubedm subcommand
2022-09-09 00:49:23 -07:00
jiepeng
211e0a6496 simplified regexp 2022-09-07 15:51:36 +08:00
Claudiu Belu
d192029e6a unittests: Fixes cmd unit tests for Windows
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- filepath.IsAbs does not consider "/" or "\" as absolute paths, even
  though files can be addressed as such.
- paths not properly joined (filepath.Join should be used).
- files not closed, which means that they cannot be removed / renamed.
- some assertions fail due to slashes / backslashes not matching.
- backslashes need to be escaped in yaml files, or put between ''
instead of "".
2022-08-26 16:03:13 +03:00
Claudiu Belu
49ef27009d unittests: Fixes unit tests for Windows
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- Windows file permissions do not work the same way as the Linux ones.
- cp does not exist on Windows, and xcopy should be used instead.
- Get-Item does not work for hidden files / folders like AppData, but
  works if given the -Force flag.
2022-08-26 14:39:56 +03:00
chymy
749256e9c2 Improve tips of incorrect input of kubedm some subcommand
Signed-off-by: chymy <chang.min1@zte.com.cn>
2022-08-26 01:18:29 +00:00
cndoit18
ec43037d0f style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2022-08-25 12:07:36 +08:00
chymy
08d4748de2 kubeadm: add test cases for version_test.go
Signed-off-by: chymy <chang.min1@zte.com.cn>
2022-08-22 02:56:35 +00:00
Benjamin Elder
719c1d2680 kubeadm: make pre-release warning log less confusing 2022-08-01 15:29:36 -07:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
SataQiu
6cab9800a7 kubeadm: prefer to use pkg/errors package and cleanup fmt.Errorf 2022-07-26 16:56:16 +08:00
Mark Rossetti
40f3e624a6 Switching everything to use pause:3.8
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-07-21 14:53:15 -07:00
Kubernetes Prow Robot
1c1efde70d
Merge pull request #109639 from Abirdcfly/fixduplicateimport
cleanup: remove all duplicate import
2022-07-18 16:55:23 -07:00
Kubernetes Prow Robot
5108b0a3a0
Merge pull request #111189 from Octopusjust/k8s-pr4
Add testcases for cmd/kubeadm/app/util/net.go and version.go
2022-07-18 02:49:27 -07:00
Octopusjust
db0bfd8727
Update version_test.go
run ./hack/verify-gofmt.sh
2022-07-18 14:15:06 +08:00
ZhangYu
ba80421254 Add testcases for cmd/kubeadm/app/util/net.go and version.go 2022-07-16 09:23:48 +08:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
SataQiu
723cadf750 kubeadm: respect user specified image repository when using Kubernetes ci version 2022-07-09 16:24:51 +08:00
runzhliu
37f66cb9d8 improve the comments 2022-07-05 01:59:11 +00:00
Kubernetes Prow Robot
fa16bf8e12
Merge pull request #110791 from SataQiu/fix-kubeadm-20220626
kubeadm: fix the bug that configurable KubernetesVersion not respected during kubeadm join
2022-06-30 21:53:34 -07:00
Kubernetes Prow Robot
3eb7b7a48f
Merge pull request #110874 from chendave/fix_debug
kubeadm: Force to disable debug mode for `crictl`
2022-06-30 10:42:20 -07:00
Dave Chen
c5b22b535b kubeadm: Force to disable debug mode for crictl
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-30 15:08:45 +08:00