Kubernetes Prow Robot
a6d66d15f6
Merge pull request #114632 from neolit123/1.27-fix-dry-run-server-version
...
kubeadm: handle dry run GET actions from fake discovery
2022-12-21 04:11:26 -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
songxiao-wang87
e09c1327b0
Making a run test.
...
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2022-12-21 07:00:35 +00:00
Lubomir I. Ivanov
b0f38b223e
kubeadm: revert feature to backup kubelet config for "upgrade node"
...
There seems to be a bug where it's not possible to write to
/etc/kubernetes/tmp... at the time of backing up the old kubelet
config.yaml
Also this kubelet config backup only targets "upgrade node"
and it should also target "upgrade apply".
Revert the related changes until a fully working feature
is implemented.
2022-12-20 16:28:28 +02:00
Kubernetes Prow Robot
03bfbdd8aa
Merge pull request #114455 from SataQiu/fix-kubeadm-2022121302
...
kubeadm: fix the bug that kubeadm always do CRI detection even if it is not required by phase subcommand
2022-12-19 00:51:44 -08: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
Paco Xu
0d2952202e
kubeadm upgrade: fix dry run of backing up kubelet config file
...
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-16 17:02:28 +08:00
Kubernetes Prow Robot
c1c0e4fe0b
Merge pull request #114489 from aimuz/replace2tag
...
kubeadm: replace Runtime.GOOS with go:build tag
2022-12-15 07:27:47 -08:00
Kubernetes Prow Robot
930271fbd8
Merge pull request #114330 from chendave/backup_kubelet
...
kubeadm: backup the kubelet config file before writting the new one
2022-12-15 07:27:36 -08:00
aimuz
4860b67b48
kubeadm: replace Runtime.GOOS with go:build tag
...
Signed-off-by: aimuz <mr.imuz@gmail.com>
2022-12-15 17:57:45 +08:00
Dave Chen
cd1f082179
kubeadm: backup the kubelet config file before writting the new one
...
This addresses the TODO item so that the old kubelet config file could
be recovered if something goes wrong.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-12-15 10:16:36 +08:00
Kubernetes Prow Robot
69fe066adc
Merge pull request #114477 from chendave/kubeadm_reviewer
...
kubeadm: add chendave as kubeadm reviewer
2022-12-14 13:01:36 -08:00
Kubernetes Prow Robot
bf49c7c0b5
Merge pull request #114080 from chendave/fix_testcases
...
kubeadm: fix invalid testcase for `enforceRequirements`
2022-12-14 11:55:56 -08:00
Kubernetes Prow Robot
08160f7975
Merge pull request #113465 from chendave/golang_generic
...
kubeadm: bump to use golang generic
2022-12-14 11:55:34 -08:00
SataQiu
2501a46b80
kubeadm: avoid CRI detection for phase subcommand when it's --cri-socket flag is not set
2022-12-14 12:00:49 +08:00
Paco Xu
861db2348e
kubeadm: add feature gate EtcdLearnerMode alpha
2022-12-14 11:07:46 +08:00
Dave Chen
8995346259
kubeadm: add chendave as kubeadm reviewer
...
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-12-14 10:54:03 +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
SataQiu
c51ce945a5
kubeadm: add missing --cri-socket flag for upload-certs phase
2022-12-13 16:59:17 +08:00
Kubernetes Prow Robot
014e3be258
Merge pull request #114409 from SataQiu/kubeadm-20221211
...
kubeadm: cleanup the temporary workaround about kubelet --container-runtime flag
2022-12-11 03:11:14 -08:00
SataQiu
76bb3364d2
kubeadm: cleanup the temporary workaround about kubelet --container-runtime flag
2022-12-11 15:52:12 +08:00
Kubernetes Prow Robot
d2ed6d355e
Merge pull request #114279 from pacoxu/coredns-v1.10.0
...
update coredns to v1.10.0
2022-12-10 12:21:52 -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
Kubernetes Prow Robot
2e6d3393f7
Merge pull request #113998 from SataQiu/fix-kubeadm-20221117
...
kubeadm: respect user provided kubeconfig during discovery process
2022-12-10 03:17:39 -08:00
Kubernetes Prow Robot
ee8e76c6ea
Merge pull request #113943 from Octopusjust/k8s-pr10
...
Add test for cmd/kubeadm/app/constants/constants.go
2022-12-09 14:35:31 -08:00
Kubernetes Prow Robot
15f47da1c9
Merge pull request #113874 from SataQiu/clean-20221113
...
kubeadm: remove unused command flag constants
2022-12-09 14:34:48 -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
Paco Xu
34d845502f
kubeadm: use coredns v1.10.0
2022-12-05 11:42:43 +08:00
Paco Xu
f0d1a39e8f
add etcd 3.5.6-0 to kuebadm supported etcd version
2022-12-01 18:41:32 +08:00
QuantumEnergyE
847a39afc0
Retry patch when then service is unavailable or timeout.
2022-11-29 23:09:31 +08:00
Dave Chen
2121ce17da
kubeadm: fix invalid testcase for enforceRequirements
...
These testcases are too vague, they are not test against the scenario
they want, but instead all of them are failed due to client cannot
be created.
`kubeconfig` file is created and mocked the function of `loadConfig` in
order to make those testcases valid.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-11-24 16:52:44 +08:00
SataQiu
21cd660a1f
kubeadm: respect user provided kubeconfig during discovery process
2022-11-24 12:29:10 +08:00
Paco Xu
75f89875f8
use etcd 3.5.6-0 after promotion
2022-11-24 09:45:56 +08:00
songxiao-wang87
23fa8032ff
word misspelling
...
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2022-11-23 00:29:36 +00:00
ZhangYu
44285a16ec
Add test for cmd/kubeadm/app/constants/constants.go
...
Add test for cmd/kubeadm/app/constants/constants.go
2022-11-16 14:50:32 +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
SataQiu
69547267ef
kubeadm: remove unused command flag constants
2022-11-13 17:56:58 +08:00
Kubernetes Prow Robot
c4a8d3e9e4
Merge pull request #113462 from chendave/reset_test
...
kubeadm: add testcases for `kubeadm reset`
2022-11-02 06:47:15 -07:00
Kubernetes Prow Robot
22f3e64039
Merge pull request #113320 from chendave/test
...
kubeadm: simply struct of `joinOptions` by removing `joinControlPlane`
2022-11-01 02:48:45 -07:00
Dave Chen
3ddedf00e5
kubeadm: add testcases for kubeadm reset
...
For parity with `init` and `join`, the test file only
covers some basic scenarios and is expected to be expanded
when the config file for `kubeadm reset` is ready.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-11-01 11:34:53 +08:00
Paco Xu
e57985a3f4
remove UnversionedKubeletConfigMap feature gate: GAed in v1.25
2022-10-30 11:17:24 +08:00
Kubernetes Prow Robot
f3e6e05979
Merge pull request #113355 from chendave/preflightErrors
...
kubeadm: Don't reuse the `ignorePreflightErrors` from initCfg for `reset`
2022-10-26 08:40:36 -07:00
Dave Chen
5854b92450
kubeadm: Don't reuse the ignorePreflightErrors
from initCfg for reset
...
The init config file fetched from cluster won't have `ignorePreflightErrors`
set, and shouldn't try to reuse it even it's set with any value.
Instead, it should be defined in reset config file and fetch from it when the
reset config is ready.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-26 16:14:11 +08:00
Kubernetes Prow Robot
5539a5b80f
Merge pull request #113353 from chendave/validation
...
kubeadm: print the invalid field when validating bootstrap token discovery
2022-10-26 00:44:36 -07:00
Dave Chen
1607babd35
kubeadm: print the invalid field when validating bootstrap token discovery
...
It was saying `discovery.bootstrapToken` is invalid with empty value, while
it is actually `discovery.bootstrapToken.caCertHashes` invalid.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-26 13:45:00 +08:00
Dave Chen
d4fd5b77aa
kubeadm: simply struct of joinOptions
by removing joinControlPlane
...
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-25 19:03:47 +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
Kubernetes Prow Robot
3b8cfefaee
Merge pull request #113005 from chendave/dry-run-prepare
...
kubeadm: Enable `dry-run` mode for phase of `control-plane-prepare certs`
2022-10-17 06:59:07 -07:00
Dave Chen
b3f91f0c02
kubeadm: Enable dry-run
mode for phase of control-plane-prepare certs
...
- All certs will be created under the folder of `/etc/kubernetes/tmp/kubeadm-join-dryrunxxx`
if the `dry-run` mode is enabled.
- Try to make each phase idempotent by resetting the cert dir with `dry-run` mode
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-17 18:29:53 +08:00
Dave Chen
6694b6bf9a
kubeadm: fix the err msg if the token format is not match
...
Previously, the err msg will repeat the token ID of the form "[a-z0-9]{6}"
if the token doesn't match with the desired format.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-17 15:59:18 +08:00
Kubernetes Prow Robot
baaf22a37c
Merge pull request #113039 from chendave/fix_help_msg
...
kubeadm: fix the help msg for `kubeadm init phase upload-certs`
2022-10-14 03:38:46 -07:00
Kubernetes Prow Robot
2f7fae3451
Merge pull request #112941 from chendave/certs_msg
...
kubeadm: print out the solution if CA files do not exist
2022-10-14 01:40:45 -07:00
Dave Chen
bd1ac95974
kubeadm: fix the help msg for kubeadm init phase upload-certs
...
The phase `kubeadm init phase upload-certs` intends to be used if
secret "kubeadm-certs" is expired and deleted.
But the help msg was saying this command cannot run on its own.
It's fine to run this command on its own to upload local certs to secret.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-14 15:39:30 +08:00
Kubernetes Prow Robot
a31e88ad6e
Merge pull request #113048 from SataQiu/clean-20221013
...
kubeadm: optimize and make the usage consistent about apierrors.IsNotFound
2022-10-13 13:43:04 -07:00
SataQiu
d4cafe4738
kubeadm: optimize and make the usage consistent about apierrors.IsNotFound
2022-10-13 23:23:53 +08:00
Kubernetes Prow Robot
5301d92150
Merge pull request #112945 from chendave/dry-run
...
kubeadm: Inherit `dry-run` flags for each sub-phases
2022-10-11 03:03:02 -07:00
Dave Chen
183a26f853
kubeadm: Inherit dry-run
flags for each sub-phases
...
- The sub-phases like `kubeadm reset phase cleanup-node` which
could be run independently would be able to support the `dry-run`
mode as well.
- Consistent with the sub-phases which support the `dry-run` mode
already, such as `kubeadm init phase control-plane apiserver`.
- Prepare for the day when each of those sub-phases could be run
independently.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-11 16:02:50 +08:00
Dave Chen
3fa6662875
kubeadm: print out the solution if CA files do not exist
...
phase `kubeadm init phase kubeconfig/*` must run after the phase
`kubeadm init phase certs/ca` to get the client cert and key singed
by the CA.
print out the way to generate the CA file is more useful than just say
the file cannot be loaded.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-10 15:24:42 +08:00
Kubernetes Prow Robot
99360e5dbc
Merge pull request #112946 from chendave/typo
...
kubeadm: fix typo for cmd reset's runner binding
2022-10-09 23:55:20 -07:00
Dave Chen
b375109225
kubeadm: fix typo for cmd reset's runner binding
...
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-10-10 11:51:15 +08:00
Shiming Zhang
3a54e3e56a
Cleanup CopyFile
2022-10-09 19:59:39 +08:00
Kubernetes Prow Robot
c012d901d8
Merge pull request #112598 from wangguoyan/fix-deprecated-method
...
replace deprecated ioutil functions
2022-09-28 20:38:29 -07:00
wangguoyan
447ad7eacb
replace deprecated ioutil functions
...
Signed-off-by: wangguoyan <717338097@qq.com>
2022-09-29 09:00:10 +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
8cbe9e91c8
Merge pull request #112742 from ping035627/k8s-220926
...
Kubeadm: Cleanup runPreflight in init/preflight
2022-09-27 13:00:00 -07:00
PingWang
da88db6321
Kubeadm: Cleanup runPreflight in join/preflight
...
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
update runPreflight in init/preflight.go
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
cleanup runPreflight in init/preflight.go
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2022-09-27 19:36:45 +08:00
SataQiu
605f3dd89a
kubeadm: fix the field path of ClusterConfiguration networking validation
2022-09-27 18:51:19 +08:00
Kubernetes Prow Robot
edd6776943
Merge pull request #112732 from SataQiu/fix-kubeadm-20220926
...
kubeadm: support image repository format validation
2022-09-27 03:23:50 -07:00
Kubernetes Prow Robot
27b7d3cd41
Merge pull request #112620 from pacoxu/windows-kubeadm-ut
...
add go:build no windows for some control-plane related UT for kubeadm
2022-09-26 22:29:50 -07:00
SataQiu
b833e628b2
kubeadm: support image repository format validation
2022-09-26 19:38:42 +08:00
Paco Xu
241445759e
add go:build no windows for some control-plane related UT for kubeadm
2022-09-26 17:17:41 +08:00
anstns
105a7319b1
Optimize name rules
2022-09-22 21:46:37 +08:00
Kubernetes Prow Robot
17c5066625
Merge pull request #112596 from chendave/data
...
kubeadm: try to reuse `RunData` if possible
2022-09-20 23:37:06 -07:00
Dave Chen
41b8536a50
kubeadm: try to reuse RunData
if possible
...
The generation of `RunData` for init and join is relative time consuming,
the data should be shared / reused whenever possible.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-09-21 13:35:15 +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
127f33f63d
Merge pull request #111221 from inosato/remove-ioutil-from-kubelet
...
Remove ioutil in kubelet/kubeadm and its tests
2022-09-17 21:56:28 -07:00
Kubernetes Prow Robot
06fd0a0728
Merge pull request #112489 from dims/etcd_update_v3.5.5
...
etcd: Updated to v3.5.5
2022-09-16 08:49:16 -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
Davanum Srinivas
0f6b9b883c
etcd: Updated to v3.5.5
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-15 21:05:13 -04:00
Kubernetes Prow Robot
657776e52b
Merge pull request #112350 from chenk008/reduce_kubeadm_tls_wait
...
Reduce kubeadm tls bootstrap wait
2022-09-14 22:21:22 -07:00
chenk008
c601c7fd4c
reduce kubeadm tls bootstrap retry interval to 1s
2022-09-15 11:31:02 +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
Kubernetes Prow Robot
00c0c9d880
Merge pull request #112235 from demoManito/fix/upgrade-style
...
fix: modify declaration slice and map code style
2022-09-08 02:56:06 -07:00
Kubernetes Prow Robot
cae4c036c8
Merge pull request #112241 from xiaoliwang/simplified_regexp
...
Optimize: simplified regexp
2022-09-07 02:28:36 -07:00
demoManito
35c26f48e4
fix: map and slice create style
2022-09-07 17:10:13 +08:00
jiepeng
211e0a6496
simplified regexp
2022-09-07 15:51:36 +08:00
Kubernetes Prow Robot
4b9575acb8
Merge pull request #112272 from chendave/cleanupflags
...
kubeadm: using the existing exported method to add config flag
2022-09-06 22:26:36 -07:00
Dave Chen
6675bea8a2
kubeadm: using the existing exported method to add config flag
...
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-09-07 11:50:06 +08:00
Dave Chen
57551cc3d7
kubeadm: Add the option to cleanup the tmp
directory
...
The `tmp` is created by `kubeadm` but is never removed, the
size is expected to be expanded as time goes by.
Add one bool option to cleanup the `tmp` dir, the flag is
off by default.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-09-02 15:57:07 +08:00
Dave Chen
1bb44a8e78
kubeadm: too early return for reset with dry-run or force mode
...
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-09-01 17:02:27 +08:00
Octopusjust
48c8183fc4
cmd/kubeadm/:add test file for data.go ( #112122 )
...
Update data_test.go
according to the modification suggestions
Update data_test.go
according to the modification suggestions
2022-08-31 01:43:00 -07:00
Kubernetes Prow Robot
891cbede96
Merge pull request #110972 from chendave/cleanup_data
...
kubeadm: unify the way to cleanup the files for `kubeadm reset`
2022-08-29 00:44:36 -07:00
Kubernetes Prow Robot
50097acf15
Merge pull request #112008 from pacoxu/kubeadm-taint
...
Kubeadm cleanup for taint / toleration with master label
2022-08-28 19:58:36 -07:00