Commit Graph

11224 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
4a98fa2536
Merge pull request #114540 from pacoxu/kubeadm-v1beta2
remove deprecated Kubeadm v1beta2 API
2023-01-05 21:29:58 -08:00
Kubernetes Prow Robot
fcaa32bd99
Merge pull request #114725 from danwinship/kube-proxy-startup-cleanup
(minor) kube-proxy startup cleanup
2023-01-05 13:57:59 -08:00
Kubernetes Prow Robot
2d534e4bea
Merge pull request #114842 from chendave/nil_pointer
kubeadm: fix the nil pointer dereference in testcase
2023-01-05 05:32:22 -08:00
Paco Xu
cca7a205ad remove kubeadm v1beta2 support 2023-01-05 21:30:26 +08:00
Dave Chen
23f75bf40e kubeadm: fix the nil pointer dereference in testcase
`genCSRConfig.kubeadmConfig` is possible to be nil if there any error
from the config loading, so access the field should only be done if
there is no error in the previous step.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-01-05 16:21:15 +08:00
Dave Chen
49732716de kubeadm: unittest might run as non-root
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-01-05 12:13:19 +08:00
Paco Xu
b3056ea9bd remove the deprecated kubeadm v1beta2 API 2023-01-04 12:19:15 +08:00
Kubernetes Prow Robot
b532f2b3e7
Merge pull request #112136 from pacoxu/migrate-runtime-endpoint-flags
kubelet: migrate container runtime endpoint flag to config
2023-01-03 09:29:31 -08:00
Dan Winship
169604d906 Validate single-stack --nodeport-addresses sooner
In the dual-stack case, iptables.NewDualStackProxier and
ipvs.NewDualStackProxier filtered the nodeport addresses values by IP
family before creating the single-stack proxiers. But in the
single-stack case, the kube-proxy startup code just passed the value
to the single-stack proxiers without validation, so they had to
re-check it themselves. Fix that.
2023-01-03 09:01:45 -05:00
Dan Winship
e7ed7220eb Explicitly pass IP family to proxier
Rather than re-determining it from the iptables object in both proxies.
2023-01-03 09:01:45 -05:00
Dan Winship
fb84c4f0f0 Fix kube-proxy dual-stack-iptables-binary-presence check
Kube-proxy was checking that iptables supports both IPv4 and IPv6 and
falling back to single-stack if not. But it always fell back to the
primary IP family, regardless of which family iptables supported...
Fix it so that if the primary IP family isn't supported then it bails
out entirely.
2023-01-03 09:01:35 -05:00
Kubernetes Prow Robot
1edbb8cf1a
Merge pull request #114719 from chendave/cleanup_copy
kubeadm: return the output from stdout and stderr
2023-01-02 19:49:31 -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
JunYang
cc4126a010 use klog.InfoS instead of klog.V(0).Info-proxy part 2022-12-29 11:16:51 +08:00
Kubernetes Prow Robot
68b96575a2
Merge pull request #114669 from Nordix/ipvs-remove-module-check
Ipvs: remove module check
2022-12-26 10:09:27 -08:00
Kubernetes Prow Robot
8a71485643
Merge pull request #114658 from neolit123/1.27-fix-dry-run-server-version
kubeadm: return stored FakedServerVersion when dry-running
2022-12-22 19:05:26 -08:00
Lars Ekman
cd15ca0548 proxy/ipvs: Check that a dummy virtual server can be added
This tests both ipvs and the configured scheduler
2022-12-22 20:36:53 +01:00
Lubomir I. Ivanov
f8da9ab287 kubeadm: return stored FakedServerVersion when dry-running
If we are dry-running, do not attempt to fetch the /version
resource and just return the stored FakeServerVersion,
which is done when constructing the dry-run client in
upgrade/common.go#getClient().

The problem here is that during upgrade
dry-run client reactors are backed by a dynamic client
via NewClientBackedDryRunGetterFromKubeconfig() and
for GetActions there seems to be no analog to
Discovery().Serverversion() resource for a dynamic client(?).
2022-12-22 19:53:35 +02:00
Kubernetes Prow Robot
30e0e8edb9
Merge pull request #114597 from songxiao-wang87/runwxs-test10
Add test for cmd/kubeadm/app/images/images.go
2022-12-22 00:13:25 -08:00
Kubernetes Prow Robot
6e65c98681
Merge pull request #114596 from andrewsykim/cloud-node-ipam
Don't run cloud IPAM controller when cloud provider is not enabled
2022-12-21 16:33:25 -08:00
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
Andrew Sy Kim
0a4f582c8b cloud-controller-manager: don't run cloud IPAM controller when cloud provider is not enabled
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-12-20 10:29:02 -05:00
Andrew Sy Kim
99d83fac37 kube-controller-manager: don't run cloud IPAM controller when cloud provider is not enabled
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-12-20 10:29:02 -05: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
Shihang Zhang
4fd09a06d6 lock LegacyServiceAccountTokenNoAutoGeneration 2022-12-16 10:45:35 -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
Andy Goldstein
0bdcb93b06 Create new conversion Factory interface
Create a new conversion Factory interface for CRDs, and split out
NewDelegatingConverter as a standalone package-level function, instead
of being part of CRConverterFactory.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-13 14:38:21 -05:00
Kubernetes Prow Robot
6b9035513b
Merge pull request #113981 from TommyStarK/unit-tests/cmd-kube-controller-manager-app-options
cmd/kube-controller-manager/app/options: Improving test coverage
2022-12-13 06:25:34 -08:00
TommyStarK
454290c583 cmd/kube-controller-manager/app/options: Improving test coverage
Add a snippet of the expected error string related to the aspect being tested

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-12-13 14:05:48 +01:00
SataQiu
c51ce945a5 kubeadm: add missing --cri-socket flag for upload-certs phase 2022-12-13 16:59:17 +08:00
Paco Xu
f28f40e521 remove a flag check that was introduced in #112542; address several comments
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-13 14:00:29 +08:00
Aditi Sharma
214a0ee7b8 Migrate container runtime endpoint flag to config
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-13 14:00:29 +08:00