Commit Graph

11243 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
cc4b7dc3c5
Merge pull request #111986 from enj/enj/i/transformer_leak
kms: fix go routine leak in gRPC connection
2022-09-08 09:49:46 -07:00
Patrick Ohly
a00a1c99d5 preferredimports: support regular expressions for the import path
Having to list all packages isn't very manageable and requires constant
maintenance that is easy to miss. For example, test/e2e/framework/daemonset was
created without adding an entry for it. Promptly one file doesn't use the
intended e2edaemonset alias.

A simpler solution is to support matching the import path against a regular
expression and deriving the intended alias by expanding placeholders (${name},
$1, etc.) with the corresponding submatches from the import path. Example:

   k8s.io/kubernetes/test/e2e/framework/([^/]*) -> e2e$1

This support is backwards compatible because normal import paths don't contain
characters that are special in a regular expression and normal aliases don't
contain placeholders.

A regular expression must match the entire import path, otherwise it is
skipped.
2022-09-08 18:37:52 +02:00
Monis Khan
4e68e9b5ad
kms: fix go routine leak in gRPC connection
Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-08 11:46:57 -04: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
3d3820bba3
Merge pull request #112257 from kerthcet/cleanup/modify-remove-release
Kube-scheduler: Deprecate Component config v1beta3
2022-09-06 23:54:36 -07: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
kerthcet
700065a18d Add deprecation warning of removing scheduler CC v1beta3
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-09-07 10:09:27 +08:00
kerthcet
532d1df7ca Modify release version of removing scheduler CC v1beta2
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-09-06 14:15:55 +08:00
Jakub Przychodzeń
ef9f8d099f Ensure metric 'running_managed_controllers' is registered 2022-09-05 11:43:56 +00: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
Di Jin
0b400cf6aa Add an option for aggregator 2022-09-01 15:25:26 -07: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
Kubernetes Prow Robot
253acfc8bc
Merge pull request #112142 from SataQiu/fix-cm-20220831
controller-manager: remove deprecated insecure serving from Config
2022-08-31 06:57:01 -07:00
SataQiu
1ae5237a66 controller-manager: remove deprecated insecure serving from Config 2022-08-31 17:32:21 +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
4f66f8c408
Merge pull request #112069 from enj/enj/t/aggregated_apis
Expand aggregated API server integration test to include CRUD
2022-08-30 08:52:55 -07:00
Monis Khan
ec283e526b
Expand aggregated API server integration test to include CRUD
This change updates TestAggregatedAPIServer and the related test
server wiring to exercise the full network path between the Kube API
server and the aggregated API server.  We now assert that the wardle
API service and Kube API server discovery endpoints are fully healthy.
CRUD operations are performed through the Kube API server to the
wardle API server.

Signed-off-by: Monis Khan <mok@microsoft.com>
2022-08-30 10:44:01 -04:00
Maciej Szulik
04b4908b18
Add soltysh as cmd/kcm approver 2022-08-30 09:39:01 +02:00
Kubernetes Prow Robot
6e3d62ca1c
Merge pull request #111904 from pandaamanda/controller_codeclean
refactor: move attachdetach controller param validation ahead
2022-08-29 14:12:49 -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
SataQiu
8e4cf3b8d2 kubeadm: move show-join-command as a separate phase 2022-08-26 23:35:58 +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
Paco Xu
f445764969 fix a flag replace of container-runtime=remote 2022-08-26 19:18:42 +08:00
Dave Chen
71ef1ea68d Cleanup etcd data dir on best effort basis
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-08-26 11:55:19 +08:00
Dave Chen
f180a3f265 Move the logic of file cleanup within each phase
Guarantee that stale files are removed if end user resets cluster
by resetting each phase.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-08-26 11:30:49 +08: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
Kubernetes Prow Robot
bc9f48b841
Merge pull request #112024 from cndoit18/remove-redundant-judgment
style: remove redundant judgment
2022-08-25 07:28:18 -07:00
Paco Xu
04e0c6c160 kubeadm: do not need to remove old taint as v1.25 upgrade will remove it 2022-08-25 22:24:44 +08:00
Paco Xu
4daf5f903b kubeadm: cleanup master related taint and tolerations 2022-08-25 22:22:20 +08:00
Kubernetes Prow Robot
b87a436aed
Merge pull request #112000 from pacoxu/kubeadm-cleanup
kubeadm: remove container-runtime=remote
2022-08-25 05:14:18 -07:00
Kubernetes Prow Robot
8206c9d458
Merge pull request #111458 from muyangren2/addtest_common
add test to isKubeadmConfigPresent method
2022-08-25 03:52:06 -07:00
JunYang
2db4dea565 use klog.InfoS instead of klog.V(0).InfoS 2022-08-25 18:46:34 +08:00
Paco Xu
f9643b69f3 cleanup kubelet config file: kubeadm-flags.env to remove container-runtime flag 2022-08-25 17:55:37 +08:00
Paco Xu
5974da784c kubeadm: remove container-runtime=remote 2022-08-25 17:10:39 +08:00
cndoit18
ec43037d0f style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2022-08-25 12:07:36 +08:00
Kubernetes Prow Robot
f313ef501a
Merge pull request #111833 from ialidzhikov/cleanup/cmd-kube-proxy
cmd/kube-proxy: Replace deprecated func usage from the `k8s.io/utils/pointer` pkg
2022-08-24 13:31:49 -07:00
Kubernetes Prow Robot
2a8eff983e
Merge pull request #112006 from pacoxu/kubeadm-registry-name-cleanup
kubeadm: remove MutateImageRepository for registry change
2022-08-24 12:01:49 -07:00
Kubernetes Prow Robot
4bf457ea95
Merge pull request #112005 from pacoxu/kubeadm-dup-unix-prefix
kubeadm: revert dedup prefix unix:// in node annotation
2022-08-24 05:52:14 -07:00
Kubernetes Prow Robot
da112dda68
Merge pull request #111806 from danwinship/kube-proxy-no-mode-fallback
remove kube-proxy mode fallback
2022-08-24 05:52:03 -07:00
Paco Xu
db0d55e1e6 kubeadm: remove MutateImageRepository for registry change 2022-08-24 17:47:51 +08:00
Paco Xu
09d3255572 kubeadm: revert dedup prefix unix:// in node annotation 2022-08-24 17:35:05 +08:00
Kubernetes Prow Robot
dabb1c5f93
Merge pull request #111949 from chymy/kubeadm-version-test
kubeadm: add test cases for version_test.go
2022-08-23 22:33:49 -07:00
Kubernetes Prow Robot
7f8f035ae8
Merge pull request #111836 from ialidzhikov/cleanup/cmd-kubeadm
cmd/kubeadm: Replace deprecated func usage from the `k8s.io/utils/pointer` pkg
2022-08-23 20:08:00 -07:00
Kubernetes Prow Robot
48b5b9d6a0
Merge pull request #111801 from SataQiu/fix-kubeproxy-20220811
kube-proxy: optimize the format of the flag usage string
2022-08-23 19:00:51 -07:00
Kubernetes Prow Robot
17e03f858e
Merge pull request #111783 from SataQiu/fix-kubeadm-20220810
kubeadm: try to load CA cert from external CertificateAuthority file when CertificateAuthorityData is empty for existing kubeconfig
2022-08-23 19:00:36 -07:00
Kubernetes Prow Robot
07bca2d791
Merge pull request #67782 from dims/yank-in-tree-openstack-cloud-provider
Remove in-tree openstack cloud provider
2022-08-23 18:59:48 -07:00
Kubernetes Prow Robot
94c70776ee
Merge pull request #111656 from Octopusjust/k8s-pr7
Add test for cmd/kubeadm/app/cmd/util/cmdutil.go
2022-08-23 17:16:40 -07:00
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04: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
pandaamanda
3d87919a1e refactor: move attachdetach controller param validation ahead 2022-08-18 08:56:57 +00:00
Dan Winship
946ce55b04 kube-proxy: use API constants for proxy modes rather than local redefinitions 2022-08-16 09:30:42 -04:00
Dan Winship
1609017f2b kube-proxy: remove ipvs-to-iptables fallback
If the user passes "--proxy-mode ipvs", and it is not possible to use
IPVS, then error out rather than falling back to iptables.

There was never any good reason to be doing fallback; this was
presumably erroneously added to parallel the iptables-to-userspace
fallback (which only existed because we had wanted iptables to be the
default but not all systems could support it).

In particular, if the user passed configuration options for ipvs, then
they presumably *didn't* pass configuration options for iptables, and
so even if the iptables proxy is able to run, it is likely to be
misconfigured.
2022-08-16 09:30:08 -04:00
Dan Winship
9f69a3a9d4 kube-proxy: remove iptables-to-userspace fallback
Back when iptables was first made the default, there were
theoretically some users who wouldn't have been able to support it due
to having an old /sbin/iptables. But kube-proxy no longer does the
things that didn't work with old iptables, and we removed that check a
long time ago. There is also a check for a new-enough kernel version,
but it's checking for a feature which was added in kernel 3.6, and no
one could possibly be running Kubernetes with a kernel that old. So
the fallback code now never actually falls back, so it should just be
removed.
2022-08-16 09:21:34 -04:00
Dan Winship
477d14e53b Reorganize "kube-proxy --cleanup-and-exit"
This was implemented partly in server.go and partly in
server_others.go even though even the parts in server.go were totally
linux-specific. Simplify things by putting it all in server_others.go
and get rid of some unnecessary abstraction.
2022-08-16 09:16:05 -04:00
ialidzhikov
76bf5a41cf cmd/kubeadm: Replace deprecated func usage from the k8s.io/utils/pointer pkg 2022-08-14 12:49:45 +03:00
ialidzhikov
17c14ced18 cmd/kube-proxy: Replace deprecated func usage from the k8s.io/utils/pointer pkg 2022-08-13 22:01:02 +03:00
Kubernetes Prow Robot
132f29769d
Merge pull request #111697 from thockin/master
Docs: node-port-range should not overlap ephemeral
2022-08-12 13:44:32 -07:00
SataQiu
25a81a7514 kube-proxy: optimize the format of the flag usage string 2022-08-11 19:37:25 +08:00
SataQiu
31f1d84d9a kubeadm: try to load CA cert from external CertificateAuthority file when CertificateAuthorityData is empty for existing kubeconfig 2022-08-10 21:03:27 +08:00
Kubernetes Prow Robot
759785ea14
Merge pull request #109090 from sarveshr7/multicidr-rangeallocator
Enhance NodeIPAM to support multiple ClusterCIDRs
2022-08-07 15:40:18 -07:00
Sarvesh Rangnekar
5b801ba9f9 Introduce MultiCIDRRangeAllocator
MultiCIDRRangeAllocator is a new Range Allocator which makes using
multiple ClusterCIDRs possible. It consists of two controllers, one for
reconciling the ClusterCIDR API objects and the other for allocating
Pod CIDRs to the nodes.

The allocation is based on the rules defined in
https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2593-multiple-cluster-cidrs
2022-08-06 00:10:39 +00:00
Octopusjust
d1dd3691c5
Update cmdutil_test.go
Modify error reporting format
2022-08-05 09:47:12 +08:00
Sarvesh Rangnekar
7093b10416 Introduce networking/v1alpha1 api, ClusterCIDR type
Introduce networking/v1alpha1 api group.

Add `ClusterCIDR` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.
2022-08-05 00:54:00 +00:00
Jonathan Dobson
5f774832a5 Move CSIInlineVolume feature to GA 2022-08-04 13:06:30 -06:00
Tim Hockin
5f59159bfc Docs: node-port-range should not overlap ephemeral 2022-08-04 10:26:26 -07:00
Davanum Srinivas
8bec318b5d
Switch klog call to use structured logging
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-04 10:54:37 -04:00
Kubernetes Prow Robot
e539bb5a50
Merge pull request #111596 from muyangren2/addtest_virtualIP
add test for GetAPIServerVirtualIP
2022-08-04 04:57:46 -07:00
Jiawei Wang
d52cdeae79 cleanup: Remove storageos volume plugins from k8s codebase 2022-08-03 20:19:59 +00:00
Kubernetes Prow Robot
442574f3a7
Merge pull request #111513 from jingxu97/july/localstorage
Promote Local storage capacity isolation feature to GA
2022-08-03 13:05:59 -07:00
muyangren2
4af5cc3443 add test for GetAPIServerVirtualIP
modify

modify

modify

modify

modify
2022-08-03 18:12:00 +08:00
ZhangYu
20affda7f7 Add test for cmd/kubeadm/app/cmd/util/cmdutil.go 2022-08-03 15:01:55 +08:00
jinxu
0064010cdd Promote Local storage capacity isolation feature to GA
This change is to promote local storage capacity isolation feature to GA

At the same time, to allow rootless system disable this feature due to
unable to get root fs, this change introduced a new kubelet config
"localStorageCapacityIsolation". By default it is set to true. For
rootless systems, they can set this configuration to false to disable
the feature. Once it is set, user cannot set ephemeral-storage
request/limit because capacity and allocatable will not be set.

Change-Id: I48a52e737c6a09e9131454db6ad31247b56c000a
2022-08-02 23:45:48 -07:00
Kubernetes Prow Robot
1de16be28f
Merge pull request #111462 from jprzychodzen/controllers
Enable 'running_managed_controllers' for KCM/CCM controllers: routes, services and cloud-node
2022-08-02 13:59:09 -07:00
Kubernetes Prow Robot
96439a0c3c
Merge pull request #111547 from kerthcet/feat/mark-cc-v1beta2-deprecated
Deprecate kubescheduler ComponentConfig v1beta2
2022-08-02 12:48:06 -07:00
Kubernetes Prow Robot
d40bc18461
Merge pull request #105126 from sallyom/tracing-kubelet
kubelet tracing instrumentation
2022-08-02 11:38:06 -07:00
Kubernetes Prow Robot
70dcb0f129
Merge pull request #111618 from Jiawei0227/flocker
cleanup: Remove flocker volume plugins from k8s codebase
2022-08-02 09:16:16 -07:00
Kubernetes Prow Robot
0d46dc1f46
Merge pull request #111619 from Jiawei0227/quobyte
cleanup: Remove quobyte volume plugins from k8s codebase
2022-08-02 08:09:57 -07:00
kerthcet
c8fbd78c16 Deprecate kubescheduler ComponentConfig v1beta2
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-08-02 22:11:11 +08:00
Jakub Przychodzeń
08749750a9 Enable 'running_managed_controllers' for few more controllers 2022-08-02 07:33:32 +00:00
muyangren2
fc976d9f89 add test for GetNodeNameAndHostname 2022-08-02 11:03:21 +08:00
Jiawei Wang
9c869b3dfc cleanup: Remove quobyte volume plugins from k8s codebase 2022-08-02 00:47:02 +00:00
Jiawei Wang
ff063889a7 cleanup: Remove flocker volume plugins from k8s codebase
Flocker storage plugin removed from k8s codebase.

Flocker, an early external storage plugin in k8s,
has not been in maintenance and their business is
down. As far as I know, the plugin is not being
used anymore.

This PR removes the whole flocker dependency and
codebase from core k8s to reduce potential security
risks and reduce maintenance work from the sig-storage community.
2022-08-02 00:42:50 +00:00
Benjamin Elder
719c1d2680 kubeadm: make pre-release warning log less confusing 2022-08-01 15:29:36 -07:00
Kubernetes Prow Robot
3a650c5c56
Merge pull request #111502 from muyangren2/addtest_apiendpoint
add test for String
2022-08-01 12:10:40 -07:00
Kubernetes Prow Robot
42b6b2887c
Merge pull request #110888 from likakuli/feature_ignoreeventforgc
feat: ignore all event resource for gc
2022-08-01 12:10:28 -07:00
Kubernetes Prow Robot
4b5ee802e8
Merge pull request #111466 from jprzychodzen/nodeipam
Enable 'running_managed_controllers' for KCM nodeipam controller
2022-08-01 10:24:40 -07:00
Sally O'Malley
47e7d8034f
kubelet tracing
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Co-authored-by: David Ashpole <dashpole@google.com>
2022-08-01 12:55:02 -04:00
Kubernetes Prow Robot
d46742b387
Merge pull request #111411 from alculquicondor/deprecate-disable-taint-manager
Mark enable-taint-manager CLI flag as deprecated
2022-08-01 09:02:28 -07:00
Kubernetes Prow Robot
ebad8c70c2
Merge pull request #111492 from muyangren2/addtest_validation_port
add test for ValidatePort
2022-08-01 03:50:29 -07:00
muyangren2
c0cabc67e1 add test
modify

modify2
2022-08-01 15:28:03 +08:00
Kubernetes Prow Robot
451c00cc70
Merge pull request #109263 from FeLvi-zzz/add-kubelet-nodeLabels-validation
validate nodeLabels in kubelet
2022-07-29 21:22:26 -07:00
inosato
3b95d3b076 Remove ioutil in kubelet and its tests
Signed-off-by: inosato <si17_21@yahoo.co.jp>
2022-07-30 12:35:26 +09:00
Kubernetes Prow Robot
17d3eecc7c
Merge pull request #111431 from ialidzhikov/fix/seccomp-default-help-text
Update the feature state in the help text of the `--seccomp-default` flag
2022-07-29 19:29:36 -07:00
Kubernetes Prow Robot
c809129f2c
Merge pull request #103069 from jackfrancis/cmd-kubelet-kubeserver-new-main-kubelet
chore(kubelet): simpler createAndInitKubelet func
2022-07-29 14:29:12 -07:00
Kubernetes Prow Robot
d05780e38d
Merge pull request #109347 from HirazawaUi/master
the err of "GetKubeletContainer" function should not affect the value of "RuntimeCgroups"
2022-07-29 13:17:35 -07:00
Kubernetes Prow Robot
442548a064
Merge pull request #110534 from kerthcet/feat/ga-component-config
Graduate component config to stable in kube-scheduler
2022-07-29 09:59:11 -07:00
Clément Nussbaumer
1459fdf7cf Fix kubeadm upgrade plan issue with FQDN nodes names
the fix introduced in #110634 also introduces a bug preventing `kubeadm
upgrade plan` from running on nodes having a different `os.Hostname()`
than node name. concretely, for a node `titi.company.ch`,
`os.Hostname()` will return `titi`, while the full node name is actually
`titi.company.ch`. this simple fix uses the `cfg.NodeRegistration.Name`
instead, which fixes the issue on my nodes with a FQDN node name

Keep previous hostname retrieval as fallback for dupURL CRI fix
2022-07-29 10:42:21 +02:00
kerthcet
02f77a1b84 Feat: ga component config in kube-scheduler
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-07-29 08:47:48 +08:00
Kubernetes Prow Robot
2c8af1e4b1
Merge pull request #111455 from chendave/clientset
kubeadm: move `getClientSet` to cmd utils
2022-07-28 05:03:09 -07:00
muyangren2
2422e99df3 add test for String
modify
2022-07-28 18:23:44 +08:00
muyangren2
fc6bbf991e add test in cmd/kubeadm/app/apis/kubeadm/validation/validation_test.go for ValidatePort
modify
2022-07-28 17:12:14 +08:00
Kubernetes Prow Robot
610b7839a0
Merge pull request #111399 from Argh4k/i-111290
Modify timeout for etcd healthcheck
2022-07-27 07:36:28 -07:00
Jakub Przychodzeń
7dd4e89a99 Enable 'running_managed_controllers' for KCM nodeipam controller 2022-07-27 14:30:40 +00:00
Maciej Wyrzuc
b42045a64f Add additional etcd check to readyz with 2 seconds timeout. 2022-07-27 12:23:02 +00:00
Dave Chen
819c12276b kubeadm: move getClientSet to cmd utils
`getClientSet` is used by both cmd `token` and `reset`, move this
method to cmd utils to decouple it from one specific cmd.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-27 15:13:09 +08: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
Kubernetes Prow Robot
96a32be18d
Merge pull request #111394 from SataQiu/cleanup-20220725
kubeadm: prefer to use pkg/errors package and cleanup fmt.Errorf
2022-07-26 09:11:09 -07:00
Kubernetes Prow Robot
28fc2991a5
Merge pull request #111317 from wojtek-t/fix_leaking_goroutines_12
Clean shutdown of cloud controllers in integration tests
2022-07-26 04:45:09 -07:00
SataQiu
6cab9800a7 kubeadm: prefer to use pkg/errors package and cleanup fmt.Errorf 2022-07-26 16:56:16 +08:00
ialidzhikov
cb4a3d2ca4 Update the feature state in the help text of the --seccomp-default flag 2022-07-26 10:53:24 +03:00
Aldo Culquicondor
cdb0b6babf Mark enable-taint-manager CLI flag as deprecated
Change-Id: Ib0247e034def837f973b69c55ed6bc9486bd364e
2022-07-25 17:04:06 -04:00
Kubernetes Prow Robot
17efdc6efb
Merge pull request #111377 from chendave/v1beta3
No need to assert an error when the error is not nil
2022-07-25 12:22:45 -07:00
Lukasz Szaszkiewicz
81dec8bc6a kubeadm: pass etcd progress notification flag to etcd
The experimental-watch-progress-notify-interval flag specifies an interval
at which etcd sends data to the kube-api server.

It is used by the WatchBookmark feature which is GA since 1.17.
It will be used by a new WatchList feature which is Alpha since 1.25

In addition to that the feature was graduated to GA (non-experiment) in etcd 3.5 without any code changes
2022-07-25 12:28:51 +02:00
Wojciech Tyczyński
1f4f98e40d Clean shutdown of cloud controllers in integration tests 2022-07-25 11:28:50 +02:00
Dave Chen
79cac48b30 No need to assert an error when the error is not nil
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-25 12:26:35 +08:00
Kubernetes Prow Robot
287888b191
Merge pull request #111330 from marosset/use-pause-3.8
Switching everything to use pause:3.8
2022-07-21 18:28:48 -07: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
Jakub Przychodzeń
49553a46bd 'running_managed_controllers' for KCM/CCM for cloud-node-lifecycle controller 2022-07-21 13:18:56 +00:00
Kubernetes Prow Robot
122254fc01
Merge pull request #111210 from chymy/kubeadm-fix-typo
kubeadm: fix comment typo
2022-07-18 21:56:34 -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
8af2c50201
Merge pull request #110762 from pandaamanda/windows_default_proxy
kube-proxy: kernelspace mode is announced to be default for windows
2022-07-18 11:45:15 -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
chymy
a1fd50d53a kubeadm: fix comment typo
Signed-off-by: chymy <chang.min1@zte.com.cn>
2022-07-18 16:48:29 +08:00
Octopusjust
db0bfd8727
Update version_test.go
run ./hack/verify-gofmt.sh
2022-07-18 14:15:06 +08:00
pandaamanda
fbe934da21 kube-proxy: kernelspace mode is announced to be default for windows 2022-07-18 01:04:56 +00:00
ZhangYu
ba80421254 Add testcases for cmd/kubeadm/app/util/net.go and version.go 2022-07-16 09:23:48 +08:00
Kubernetes Prow Robot
f8e80d32c0
Merge pull request #111135 from thockin/yamlfmt-print-filenames
Make yamlfmt tool print filenames
2022-07-15 03:46:25 -07:00
Paco Xu
5c0c20a5ea
kubeadm: UnversionedKubeletConfigMap is GAed in v1.25 2022-07-14 20:56:45 +08:00
Tim Hockin
722ebf8dca Make yamlfmt tool print filenames
Otherwise fixing errors YAML is much harder.
2022-07-13 20:33:40 -07:00
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08:00
Kubernetes Prow Robot
d06fc1e1bb
Merge pull request #111039 from ncdc/resourcequota-update-filter-func
quota: add an update filter
2022-07-13 09:27:50 -07:00
SataQiu
723cadf750 kubeadm: respect user specified image repository when using Kubernetes ci version 2022-07-09 16:24:51 +08:00
Andy Goldstein
a899441484
quota: add an update filter
Fix a TODO to plumb an update filter from above in the resource quota
monitor code that was handling update events for quota-able objects,
instead of hard-coding the logic in the resource quota monitor.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-07-08 18:39:55 -04:00
Kubernetes Prow Robot
34b9f0dbed
Merge pull request #110998 from chendave/de_dup_kubeadm
kubeadm: De-dup the confirmation on the interactive cmds
2022-07-07 12:46:37 -07:00
Dave Chen
8aeee521e6 kubeadm: De-dup the confirmation on the interactive cmds
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-07 11:51:26 +08:00
Mengjiao Liu
88c6deb778 Update godoc.org to pkg.go.dev in kubeadm 2022-07-07 11:06:13 +08:00
Kubernetes Prow Robot
f88b11897d
Merge pull request #110978 from chendave/dry_run_interactive
kubeadm: Don't ask for input if it's dry run mode
2022-07-06 18:39:33 -07:00
Dave Chen
988b96fcbb kubeadm: Don't ask for input if it's dry run mode
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-06 18:18:53 +08:00
runzhliu
37f66cb9d8 improve the comments 2022-07-05 01:59:11 +00:00
likakuli
74a3b8f4a9 feat: fix a bug thaat not all event be ignored by gc controller
Signed-off-by: likakuli <1154584512@qq.com>
2022-07-04 18:00:54 +08:00
JunYang
842abe9dae Execute the Run function of kubelet, no log output after failure 2022-07-01 22:24:07 +08: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
8b0221708c
Merge pull request #110744 from neolit123/1.25-update-etcd-startup-probe
kubeadm: use non-serializable startup probe for etcd pods
2022-06-30 21:53:22 -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
Lubomir I. Ivanov
2829fc03e3 kubeadm: use non-serializable startup probe for etcd pods
As per the etcd maintainers' recommendation - startup probes
shouldn't be serialized, while the liveness probes should be.
2022-06-30 20:26:32 +03:00
SataQiu
2fb1941ae3 kubeadm: improve the error message of getClusterNodeMask func 2022-06-30 20:28:45 +08: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
SataQiu
5b2d6ca5df kubeadm: fix the bug that configurable KubernetesVersion not respected during kubeadm join 2022-06-30 14:47:33 +08:00
Kubernetes Prow Robot
dafa55be10
Merge pull request #110837 from SataQiu/fix-kubeadm-20220628
kubeadm: support retry mechanism for removing container in reset phase
2022-06-29 05:12:05 -07:00
SataQiu
3889a6cac8 kubeadm: support retry mechanism for removing container in reset phase 2022-06-29 17:54:56 +08:00
Kubernetes Prow Robot
4cd7394252
Merge pull request #110819 from pacoxu/kubeadm-join-doc
kubeadm: update join --discovery-file docs
2022-06-28 19:58:03 -07:00
Paco Xu
0b44750ab9 kubeadm: update join --discovery-file docs(support tokenfile authProvider and exec) 2022-06-28 12:12:29 +08:00
Kubernetes Prow Robot
c7eb5a49ba
Merge pull request #109407 from yxxhero/remove_unused_code_in_kubelet
Clean up unused code in kubelet
2022-06-27 19:16:08 -07:00
John Howard
c6b0652b89
kubelet: silence flag output on errors (#110728)
* kubelet: silence flag output on errors

Currently, the `--help` text is output on kubelet errors. Currently on
my machine this is 280 lines. Typically kubelet is run by systemd or
similar, starting it a loop. This means when an issue is encountered, we
are spammed by 100s of logs per second, masking the real error.

With this PR, the list of all flags is silenced. Users can still access
them by `kubelet --help` as normal. This same `SilenceUsage` is already
set in the api-server command.

* Update cmd/kubelet/app/server.go

Co-authored-by: Paco Xu <paco.xu@daocloud.io>

Co-authored-by: Paco Xu <paco.xu@daocloud.io>
2022-06-27 11:34:59 -07:00
Kubernetes Prow Robot
34b4125351
Merge pull request #110656 from pacoxu/kubeadm-dup-unix
kubeadm: handle dup unix:// prefix in node annotation
2022-06-24 00:21:21 -07:00
Paco Xu
8555f401a0 kubeadm: handle dup unix:// prefix in node annotaiton 2022-06-24 11:16:34 +08:00
Kubernetes Prow Robot
07dfdf0859
Merge pull request #110709 from chendave/fix_renew
kubeadm: Honor `cert-dir` for cert operations
2022-06-23 19:51:19 -07:00
Kubernetes Prow Robot
035f22d781
Merge pull request #110712 from chendave/ignore_args
kubeadm: certs renew doesn't support positional args
2022-06-23 09:09:43 -07:00
Dave Chen
e8e804deaa kubeadm: certs renew doesn't support positional args
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-23 19:52:22 +08:00
Kubernetes Prow Robot
df0af6f7b8
Merge pull request #110736 from Octopusjust/k8s-pr3
Incomplete coverage of test scenarios
2022-06-23 04:33:44 -07:00
Dave Chen
57646c941f kubeadm: Honor cert-dir for cert operations
- `cert-dir` could be specified to a value other than the default value
- we have tests that should be executed successfully on the working cluster

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-23 19:32:20 +08:00
ZhangYu
9f4562c7b6 Incomplete coverage of test scenarios 2022-06-23 11:41:23 +08:00
Kubernetes Prow Robot
e9702cfc1b
Merge pull request #110593 from SataQiu/kubeadm-coredns-20220615
kubeadm: add the preferred pod anti-affinity for CoreDNS Deployment
2022-06-22 09:29:56 -07:00
Kubernetes Prow Robot
fd20191212
Merge pull request #110684 from chymy/fix-typo-for-kubeadm
fix several typo
2022-06-22 08:23:45 -07:00
Kubernetes Prow Robot
4720f0725c
Merge pull request #110531 from Iceber/fix-run-controller-manager
fix the running of the kube-controller-manager
2022-06-21 13:15:55 -07:00
chymy
c8aa25e472 fix several typo
Signed-off-by: chymy <chang.min1@zte.com.cn>
2022-06-21 09:11:41 +00:00
Kubernetes Prow Robot
609db7ed0b
Merge pull request #110635 from chendave/kubeadm_fix
kubeadm: fail faster when the version is not provided
2022-06-19 10:06:03 -07:00
ialidzhikov
0a83f72214 kubelet: Update deprecation messages from 1.24 to 1.25
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-06-18 19:45:50 +03:00
yxxhero
7a5af811e7 remove unused code in kubelet
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-06-18 15:03:27 +08:00
Iceber Gu
cac919bca4 fix the running of the kube-controller-manager
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2022-06-18 09:24:04 +08:00
Patrick Ohly
4c6338ac0f logs: replace config methods with functions
API types are only supposed to have methods related to serialization.
2022-06-17 20:22:13 +02:00
Patrick Ohly
ea3f25f49b logs: add alpha+beta feature gates
It is useful to have the ability to control whether alpha or beta features are
enabled. We can group features under LoggingAlphaOptions and LoggingBetaOptions
because the configuration is designed so that each feature individually must be
enabled via its own option.

Currently, the JSON format itself is beta (graduated in 1.23) but additional
options for it were only added in 1.23 and thus are still alpha:

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M --feature-gates LoggingBetaOptions=false
  [format: Forbidden: Log format json is BETA and disabled, see LoggingBetaOptions feature, options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M
  [options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

This is the same approach that was taken for CPUManagerPolicyAlphaOptions and
CPUManagerPolicyBetaOptions.

In order to test this without modifying the global feature gate in a test file,
ValidateKubeletConfiguration must take a feature gate as argument.
2022-06-17 20:22:13 +02:00
Patrick Ohly
1aceac797d logs: make LoggingConfiguration an unversioned API
Making the LoggingConfiguration part of the versioned component-base/config API
had the theoretic advantage that components could have offered different
configuration APIs with experimental features limited to alpha versions (for
example, sanitization offered only in a v1alpha1.KubeletConfiguration). Some
components could have decided to only use stable logging options.

In practice, this wasn't done. Furthermore, we don't want different components
to make different choices regarding which logging features they offer to
users. It should always be the same everywhere, for the sake of consistency.

This can be achieved with a saner Go API by dropping the distinction between
internal and external LoggingConfiguration types. Different stability levels of
indidividual fields have to be covered by documentation (done) and potentially
feature gates (not currently done).

Advantages:

- everything related to logging is under component-base/logs;
  previously this was scattered across different packages and
  different files under "logs" (why some code was in logs/config.go
  vs. logs/options.go vs. logs/logs.go always confused me again
  and again when coming back to the code):

  - long-term config and command line API are clearly separated
    into the "api" package underneath that

  - logs/logs.go itself only deals with legacy global flags and
    logging configuration

- removal of separate Go APIs like logs.BindLoggingFlags and
  logs.Options

- LogRegistry becomes an implementation detail, with less code
  and less exported functionality (only registration needs to
  be exported, querying is internal)
2022-06-17 20:22:13 +02:00
Patrick Ohly
4033e64bf1 kubelet: initialize logging even sooner, return error
After the removal of the dynamic kubelet configuration feature it became
possible to initialize logging directly after configuration parsing. The
advantage is that logs emitted by
kubeletconfigvalidation.ValidateKubeletConfiguration and
`klog.InfoS("unsupported configuration ...` already use the intended log
output.

After the code was originally added, Run was replaced by RunE. Taking advantage
of that and returning an error is cleaner.
2022-06-17 20:06:14 +02:00
Dave Chen
aa5dfd8b28 kubeadm: fail faster when the version is not provided
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-17 16:42:56 +08:00
Kubernetes Prow Robot
4e17f88b7e
Merge pull request #110506 from yangjunmyfm192085/removedockershim-des
Remove the description of the docker shim from the kubelet
2022-06-16 08:54:48 -07:00
JUN YANG
8567f2bd53
Update cmd/kubelet/app/server.go
Co-authored-by: Danielle <dani@builds.terrible.systems>
2022-06-16 08:29:14 +08:00
JunYang
8bfea65f69 Remove the description of the docker shim from the kubelet 2022-06-16 00:01:34 +08:00
Lubomir I. Ivanov
81b3540206 kubeadm: ensure kubelet patch results are in YAML
Once we patch a kubelet configuration file, the patched output
is in JSON. Make sure it's converted back to YAML, given
the kubelet config in the cluster and on disk is always in YAML.

Add unit test for the new function applyKubeletConfigPatches()
2022-06-15 13:38:04 +03:00
SataQiu
299e745127 kubeadm: add the preferred pod anti-affinity for CoreDNS Deployment 2022-06-15 14:38:12 +08:00
tallaxes
4a542609aa
Support more auth strategies in kubeadm join with discovery file (#110553)
* Add support for client-go credential plugins

* Add support for authprovider authentication

* Add support for TokenFile authentication
2022-06-14 08:03:45 -07:00
Kubernetes Prow Robot
4407a02aef
Merge pull request #110560 from lunhuijie/fixTestpki
Incomplete coverage of test scenarios and optimize bad code
2022-06-14 04:53:32 -07:00
10284789刁浩
696d537239 Incomplete coverage of test scenarios and bad code 2022-06-14 07:48:43 +00:00
Kubernetes Prow Robot
f15b0d1bd7
Merge pull request #110489 from pacoxu/kubeadm-coredns-v1.9.3
kubeadm: upgrade coredns to v1.9.3
2022-06-13 12:16:12 -07:00
Kubernetes Prow Robot
48efb361f3
Merge pull request #110323 from Thearas/docs-ephemeral-storage
docs: add `ephemeral-storage` to `SystemReserved`/`KubeReserved` comment
2022-06-10 13:19:44 -07:00
Paco Xu
178dc11b75 kubeadm: upgrade coredns to v1.9.3 2022-06-09 18:45:26 +08:00
Paco Xu
31922c7794 kubeadm: use staticpod known tags for upgrade/init phases 2022-06-09 14:21:48 +08:00
Kubernetes Prow Robot
cfda5bc1d8
Merge pull request #110457 from aojea/class_e_range
unit tests for Class E IP addresses
2022-06-08 10:10:22 -07:00
Kubernetes Prow Robot
0985c476e3
Merge pull request #109995 from wangyysde/fix_issue_2681
add print-manifest flag to print addon manifests to STDOUT
2022-06-08 09:00:22 -07:00
Antonio Ojea
2124f17c72 unit tests for Class E IP addresses 2022-06-08 15:29:48 +02:00
Paco Xu
29aca9692c overwrite known targets in patch manager cache in case it changes 2022-06-08 16:10:41 +08:00
wangyysde
e863ebb6b5 add print-manifest flag to print addon manifests to STDOUT
Signed-off-by: wangyysde <net_use@bzhy.com>
2022-06-08 13:45:37 +08:00
Kubernetes Prow Robot
cd4b8ed070
Merge pull request #110405 from neolit123/1.25-kubelet-config-patches
kubeadm: add support for patching a "kubeletconfiguration" target
2022-06-07 07:05:07 -07:00
Kubernetes Prow Robot
9fad5c981a
Merge pull request #110327 from neolit123/1.25-ga-unversioned-kubelet-config
kubeadm: graduate the UnversionedKubeletConfigMap FG to GA
2022-06-07 07:04:56 -07:00
Lubomir I. Ivanov
2134026e3b kubeadm: allow passing the --patches flag to init/join/node phases
Allow passing the --patches flag to init/join/node phases
relevant to the kubelet writing the config file on disk.
2022-06-06 20:37:27 +03:00
Lubomir I. Ivanov
428c3fe954 kubeadm: document "kubeletconfiguration" as a patch target
Document the "kubeletconfiguration" as a patch target in the
v1beta3 API Init/JoinConfiguration.Patches struct
and also for the --patches flag.
2022-06-06 20:37:26 +03:00
Lubomir I. Ivanov
c3c9fb8608 kubeadm: add unit tests for patching a "kubeletconfiguration" target 2022-06-06 20:37:26 +03:00
Lubomir I. Ivanov
85fb6b01f8 kubeadm: apply patches to the kubelet config before writing it to disk
In phases/kubelet/WriteConfigToDisk() create a patch
manager for the root patches directory and apply
the user patches with a target "kubeletconfiguration".
2022-06-06 20:37:26 +03:00
Lubomir I. Ivanov
665f66d2bc kubeadm: pass io.Writer and "patches dir" to WriteConfigToDisk()
With phases/kubelet/WriteConfigToDisk() about to support patches
it is required that the function accepts an io.Writer
where the PatchManager can output to and also a patch directory.

Modify all call sites of the function WriteConfigToDisk()
to properly prepare an pass an io.Writer and patches dir to it.
This results in command phases for init/join/upgrade to pass
the root io.Writer (usually stdout) and the patchesDir populated
either via the config file or --patches flag.
2022-06-06 20:37:26 +03:00
Kubernetes Prow Robot
70dca66271
Merge pull request #109388 from ialidzhikov/cleanup/experimental-kernel-memcg-notification
kubelet: Remove the deprecated `--experimental-kernel-memcg-notification` flag
2022-06-03 09:30:33 -07:00
Kubernetes Prow Robot
b7b824bb9e
Merge pull request #110033 from mk46/etcd_update_v3.5.4
etcd: Updated to v3.5.4
2022-06-02 13:26:31 -07:00
Lubomir I. Ivanov
1c46686f09 kubeadm: mutate ClusterConfiguration.imageRepository to "registry.k8s.io"
If the user runs "kubeadm upgrade apply", kubeadm can download
a configuration from the cluster. If the configuration contains
the legacy default imageRepository of "k8s.gcr.io", mutate it
to the new default of "registry.k8s.io" and update the
configuration in the config map.

During "upgrade node/diff" download the configuration, mutate the
image repository locally, but do not mutate the in-cluster value.
That is done only on "apply".

This ensures that users are migrated from the old default registry
domain.
2022-06-02 17:37:30 +03:00
Lubomir I. Ivanov
9f6df1d489 kubeadm: graduate the UnversionedKubeletConfig FG to GA
- lock the FG to true by default
- cleanup wrappers and logic related to versioned vs unversioned
naming of API objects (CMs and RBAC)
- update unit tests
2022-06-01 17:17:07 +03:00
Thearas
2457fbc643 docs: add ephemeral-storage to SystemReserved/KubeReserved comment 2022-06-01 16:19:26 +08:00
Manish Kumar
e9e8be304c etcd: Updated to v3.5.4 2022-06-01 07:52:46 +05:30
Davanum Srinivas
50bea1dad8
Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Kubernetes Prow Robot
92263ee0dd
Merge pull request #110072 from neolit123/1.25-kubeadm-etcd-liveness-probe
kubeadm: add serializable health checks for etcd probes
2022-05-30 00:40:52 -07:00
Kubernetes Prow Robot
ee0a070865
Merge pull request #110082 from twilight0620/addTest2
add test case TestValidateServiceNodePort for validateServiceNodePort method
2022-05-26 08:45:35 -07:00
Wojciech Tyczyński
fe3616cafb Clean shutdown of kcm, ccm and scheduler 2022-05-26 12:36:59 +02:00
Wojciech Tyczyński
6f706775bc Clean shutdown of test apiserver 2022-05-26 10:42:48 +02:00
Kubernetes Prow Robot
0f8b0e14ae
Merge pull request #110141 from chymy/kubeadm-remove-imagespull
kubeadm: remove unused ImagesPull
2022-05-20 03:45:12 -07:00
Kubernetes Prow Robot
3308ce1caf
Merge pull request #110137 from neolit123/1.25-update-master-label-taint
kubeadm: cleanup OldControlPlaneTaint from unit tests
2022-05-19 22:05:13 -07:00
chymy
525b8cc4b2 kubeadm: remove unused ImagesPull
Signed-off-by: chymy <chang.min1@zte.com.cn>
2022-05-20 10:49:52 +08:00
Lubomir I. Ivanov
9c68116461 kubeadm: cleanup OldControlPlaneTaint from unit tests
The OldControlPlaneTaint taint (master) can be replaced
with the new ControlPlaneTaint (control-plane) taint.

Adapt unit tests in markcontrolplane_test.go
and cluster_test.go.
2022-05-19 22:00:39 +03:00
Manish Kumar
58cc7e7d43 Parse ENV vars to crictl command 2022-05-19 21:53:50 +05:30
Lubomir I. Ivanov
80e5bcae9b kubeadm: remove RemoveOldControlPlaneLabel
The function is no longer used and was missed in a
1.25 cleanup PR.
2022-05-18 15:42:08 +03:00
Kubernetes Prow Robot
84c8afeba3
Merge pull request #110095 from neolit123/1.25-update-master-label-taint
kubeadm: cleanup the "master" taint on CP nodes during upgrade
2022-05-18 00:52:54 -07:00
Kubernetes Prow Robot
71da53c28b
Merge pull request #108218 from cyclinder/remove_featuregate
remove featuregate in 1.25
2022-05-17 20:08:53 -07:00
Kubernetes Prow Robot
90d7400ca1
Merge pull request #109356 from pacoxu/kubeadm-2426-cri
kubeadm: remove temporary handling of CRI socket paths without URL scheme
2022-05-17 18:00:52 -07:00
Kubernetes Prow Robot
9169f16841
Merge pull request #108447 from pacoxu/kubeadm-json-upgrade-plan
`Kubeadm upgrade plan` support json/yaml output
2022-05-17 16:46:31 -07:00
Lubomir I. Ivanov
ddd046f3dd kubeadm: cleanup the "master" taint on CP nodes during upgrade
- iniconfiguration.go: stop applying the "master" taint
for new clusters; update related unit tests in _test.go
- apply.go: Remove logic related to cleanup of the "master" label
during upgrade
- apply.go: Add cleanup of the "master" taint on CP nodes
during upgrade
- controlplane_nodes_test.go: remove test for old "master" taint
on nodes (this needs backport to 1.24, because we have a kubeadm
1.25 vs kubernetes test suite 1.24 e2e test)
2022-05-17 19:21:49 +03:00
twilight0620
62298c0493 add test case TestValidateServiceNodePort for validateServiceNodePort method 2022-05-17 14:32:06 +08:00
Lubomir I. Ivanov
29148f61ac kubeadm: add serializable health checks for etcd probes
Use the etcd 3.5.3+ HTTP(s) endpoint "/health?serializable=true",
to allow the kubelet liveness and starup probes in the
kubeadm generated etcd.yaml (static Pod) to track
individual member health instead of tracking the whole
etcd cluster health.
2022-05-16 20:18:35 +03:00
Paco Xu
ab51557a0c kubeadm: container runtime is by default docker in kubelet v1.23
- can be removed in v1.26
2022-05-14 18:31:48 +08:00
Lubomir I. Ivanov
6efdcfd15b kubeadm: perform dockershim cleanup for 1.25
Given kubeadm 1.25 only supports kubelet 1.25 and 1.24,
1.23 related logic around dockershim can be removed.

- Don't clean the directories
/var/lib/dockershim, /var/runkubernetes, /var/lib/cni
- Pass the CRISocket directly to the kubelet
--container-runtime-endpoint flag without extra handling
of dockershim
- No longer apply the --container-runtime=remote flag
as that is the only possible value in 1.24 and 1.25
- Update unit tests


Note: we are still passing --pod-infra-container-image
to avoid the pause image to be GCed by the kubelet.
2022-05-12 21:38:17 +03:00
cyclinder
6150737d11 remove feature gate GA for 1.25
Signed-off-by: cyclinder qifeng.guo@daocloud.io
2022-05-12 14:15:23 +08:00
Wojciech Tyczyński
2dd44d6226 Cleanup no-longer used storage cleanup method 2022-05-11 20:11:37 +02:00
Lubomir I. Ivanov
b1f3034051 kubeadm: only taint CP nodes when the legacy "master" taint is present
During upgrade when a CP node is missing the old / legacy "master"
taint, assume the user has manually removed it to allow
workloads to schedule.

In such cases do not re-taint the node with the new "control-plane"
taint.
2022-05-05 23:39:23 +03:00
Kubernetes Prow Robot
f1ad477c88
Merge pull request #109751 from SataQiu/clean-kubeadm-20220502
kubeadm: replace *clientset.Clientset with clientset.Interface for join phase
2022-05-05 01:43:06 -07:00
Kubernetes Prow Robot
b593ed3118
Merge pull request #109659 from heqg/structuredLog01
Log StructuredLog: spelling formatting
2022-05-04 02:35:34 -07:00
Kubernetes Prow Robot
7adb7c1d06
Merge pull request #109612 from pandaamanda/remove_DeprecatedControllerOptions
refactor: remove deprecated `deleting-pods-qps` `deleting-pods-burst` `register-retry-count`  flags
2022-05-04 02:34:54 -07:00
Kubernetes Prow Robot
74ec2dd197
Merge pull request #109527 from navist2020/kubeadm/preflightError
Return preflightError if an error occurs when running the preflight
2022-05-04 01:29:04 -07:00
Kubernetes Prow Robot
d0fc41d105
Merge pull request #109324 from wppzxc/fix-output
Fix: test case wrong output in cmd/kubeadm/app/cmd/completion_test.go
2022-05-03 19:31:14 -07:00
Kubernetes Prow Robot
cc2807c521
Merge pull request #109303 from wojtek-t/clean_storage_shutdown
Cleanup rest storage resources on shutdown
2022-05-03 19:30:57 -07:00
Kubernetes Prow Robot
2d1f12942f
Merge pull request #108476 from ialidzhikov/cleanup/experimental-cluster-signing-duration
kube-controller-manager: Remove the deprecated `--experimental-cluster-signing-duration` flag
2022-05-03 18:23:31 -07:00
SataQiu
eb1492bb00 kubeadm: replace *clientset.Clientset with clientset.Interface for join phase 2022-05-02 19:25:47 +08:00
何庆国10193842
3d14bcb9a4 Log StructuredLog: spelling formatting
Signed-off-by: 何庆国10193842 <he.qingguo@zte.com.cn>
2022-04-26 17:04:06 +08:00
熊中谅10171568
c4579165f1 refactor: remove deprecated flags
refactor: remove deprecated deleting-pods-qps deleting-pods-burst register-retry-count flags
2022-04-22 20:28:12 +08:00
navist2020
2a7e85bfdb Return preflightError if an error occurs when running the preflight 2022-04-20 11:39:35 +08:00
Wojciech Tyczyński
0527a0dd45 Cleanup rest storage resources on shutdown 2022-04-19 15:59:13 +02:00
Stephen Augustus
3f85937b11
etcd: Update to v3.5.3
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2022-04-13 19:04:00 -04:00
James Laverack
7d57d5c70d Revert "Introduce APIs to support multiple ClusterCIDRs (#108290)"
This reverts commit b9792a9dae.
2022-04-13 13:58:19 +01:00
ialidzhikov
c682716e87 kubelet: Remove the deprecated --experimental-kernel-memcg-notification flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-04-08 10:40:25 +03:00
Soh Takada
5ec2aaa339 validate nodeLabels in kubelet
Signed-off-by: Soh Takada <34182539+FeLvi-zzz@users.noreply.github.com>
2022-04-07 20:27:11 +09:00
Paco Xu
36594d739b CRI socket paths should have URL scheme 2022-04-07 16:11:58 +08:00
HirazawaUi
fc0d38f02f The same err should not judge whether it is empty twice, and the err of "GetKubeletContainer" function should not affect the value of "RuntimeCgroups" 2022-04-07 11:08:25 +08:00
pengpeng wu
0b076a3dc3 Fix: test case wrong output in cmd/kubeadm/app/cmd/completion_test.go 2022-04-06 10:59:58 +08:00
Kubernetes Prow Robot
14cc997d03
Merge pull request #107178 from SataQiu/deprecated-20211222
kube-controller-manager: remove unused option deployment-controller-sync-period for deployment controller
2022-04-01 21:22:10 -07:00
Davanum Srinivas
108e3e28a9
Correctly attribute some datastructures from gotestsum repository
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-04-01 14:49:15 -04:00
David Ashpole
120da3bb9b
fix copylock vet errors in component-base metrics 2022-03-31 15:07:11 +00:00
Sarvesh Rangnekar
b9792a9dae
Introduce APIs to support multiple ClusterCIDRs (#108290)
* Introduce networking/v1alpha1 api, ClusterCIDRConfig type

Introduce networking/v1alpha1 api group.

Add `ClusterCIDRConfig` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.

* Change ClusterCIDRConfig.NodeSelector type in api

* Fix review comments for API

* Update ClusterCIDRConfig API Spec

Introduce PerNodeHostBits field, remove PerNodeMaskSize
2022-03-30 19:39:00 -07:00
Davanum Srinivas
d20df79545
prune junit xml files in ci harness
Over time the size of our junit xml has exploded to the point where
test-grid fails to process them. We still have the original/full
*.stdout files from where the junit xml files are generated from so the
junit xml files need NOT have the fill/exact output for
processing/display. So let us prune the large messages with an
indicator that we have "[... clipped...]" some of the content so folks
can see that they have to consult the full *.stdout files.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-30 12:58:43 -04:00
Davanum Srinivas
917c361880
Add a utility to prune junit xml files
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-30 12:58:43 -04:00
SataQiu
9ac1b4b68f remove unused option deployment-controller-sync-period for deployment controller 2022-03-30 20:00:53 +08:00
Kubernetes Prow Robot
e4690b0fbc
Merge pull request #109123 from dims/switch-to-pause-3.7
Switch to pause 3.7 for Kubernetes 1.24
2022-03-29 20:37:39 -07:00
Jefftree
67d3dbfaae Separate OpenAPI V2 and V3 Config 2022-03-29 17:49:56 -07:00
Kubernetes Prow Robot
5b8dbfbbcf
Merge pull request #108995 from pohly/log-contextual
contextual logging
2022-03-29 17:35:59 -07:00
Kubernetes Prow Robot
faf7ad6120
Merge pull request #108146 from marosset/windows-kubelet-elevated-check
Fixing logic for kubelet permissions check on windows
2022-03-29 17:34:40 -07:00
Kubernetes Prow Robot
0f2300575c
Merge pull request #108032 from deejross/kep3140-cronjob-timezone
KEP 3140: TimeZone support for CronJob
2022-03-29 17:34:20 -07:00
Davanum Srinivas
f7ad09c447
Switch to pause 3.7
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-29 15:36:38 -04:00
Patrick Ohly
7de1b05e85 logging: add ContextualLogging feature
InitLogs overrides the klog default and turns contextual logging off. This
ensures that it is only enabled in Kubernetes commands that explicitly enable
it via a feature gate. A feature gate for it gets defined in
k8s.io/component-base/logs and is then used by Options.ValidateAndApply.

The effect of disabling contextual logging is very limited according to
benchmarks with kube-scheduler. The feature gets added anyway to satisfy the
PRR recommendation that features should be controllable.

The following commands have support for contextual logging:
- kube-apiserver
- kube-controller-manager
- kubelet
- kube-scheduler
- component-base/logs example

Supporting a feature gate check in ValidateAndApply and not in InitLogs is a
simplification: changing InitLogs to accept a FeatureGate would have implied
changing also component-base/cli.Run. This didn't seem worthwhile because
ValidateAndApply already covers the relevant commands.
2022-03-29 13:29:57 +02:00
Kubernetes Prow Robot
656dc213ce
Merge pull request #108992 from alexzielenski/cache-busting-client-go
client-go: OpenAPI v3 support
2022-03-28 21:37:11 -07:00
Ross Peoples
f3b928a23d Import tzdata in apiserver, CronJob.timeZone fixes 2022-03-28 16:33:05 -05:00
Ross Peoples
98837de446 TimeZone support for CronJobs 2022-03-28 16:33:00 -05:00
Lubomir I. Ivanov
c9386abd5f kubeadm: add etcd flag for member data consistency
Include the flag "--experimental-initial-corrupt-check"
in etcd static pod manifests to ensure
etcd member data consistency.

The etcd feature is planned for graduation in 3.6,
at which point we should switch to using the flag
without the "experimental" prefix.
2022-03-28 20:47:49 +03:00
Alexander Zielenski
52f7fd6534
update kubeadm restrictions to include v3 2022-03-28 10:07:56 -07:00
Kubernetes Prow Robot
16fe367389
Merge pull request #106451 from soltysh/cli_owners
Add cli-maintainers as approvers to cmd/(gendocs|genman|genyaml)
2022-03-28 07:51:23 -07:00
Kubernetes Prow Robot
9423ea4c1e
Merge pull request #109001 from wppzxc/master
Fix: Correct spelling mistakes in cmd/kubeadm/app/cmd/phases/workflow/runner_test.go
2022-03-28 06:45:00 -07:00
Kubernetes Prow Robot
b5f8d9ec16
Merge pull request #107724 from kkkkun/fix-leaderlost
Fixes exited messages when leaderelection lost
2022-03-28 06:44:48 -07:00
Kubernetes Prow Robot
922ccde1b4
Merge pull request #95400 from tssurya/detect-local-traffic-using-interface
Detect local traffic using interface
2022-03-28 06:43:22 -07:00
Maciej Szulik
1e62529ab8
Add cli-maintainers as approvers to cmd/(gendocs|genman|genyaml) 2022-03-28 14:00:35 +02:00
Kubernetes Prow Robot
083c3ac4e8
Merge pull request #106998 from eltociear/patch-7
Fix typo in get_test.go
2022-03-25 20:23:55 -07:00
Kubernetes Prow Robot
c239b406f0
Merge pull request #108929 from gnufied/move-expansion-feature-gate-ga
Move all volume expansion feature gates to GA
2022-03-25 18:08:16 -07:00
Surya Seetharaman
7d480d8ac8 Enable local traffic detection using the interface options
This commit adds the framework for the new local detection
modes BridgeInterface and InterfaceNamePrefix to work.

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2022-03-25 20:06:12 +01:00
Paco Xu
22fb3be96d cleanup: kubeadm upgrade plan supports json/yaml output
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2022-03-25 16:15:43 +08:00
pengpeng wu
f67ec386a5 Fix: Correct spelling mistakes in cmd/kubeadm/app/cmd/phases/workflow/runner_test.go 2022-03-25 10:08:00 +08:00
Kubernetes Prow Robot
d60df5ba04
Merge pull request #108159 from pohly/logcheck
logcheck update and golangci-lint integration
2022-03-24 18:37:50 -07:00
Mark Rossetti
2e036ad7c3 Fixing logic for kubelet permissions check on windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-03-24 14:57:08 -07:00
Hemant Kumar
9343cce20b remove ExpandPersistentVolume feature gate 2022-03-24 10:02:47 -04:00
Patrick Ohly
edffc700a4 enhance and fix log calls
Some of these changes are cosmetic (repeatedly calling klog.V instead of
reusing the result), others address real issues:

- Logging a message only above a certain verbosity threshold without
  recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
  this matters when using a logging backend which records the verbosity
  level.

- Passing a format string with parameters to a logging function that
  doesn't do string formatting.

All of these locations where found by the enhanced logcheck tool from
https://github.com/kubernetes/klog/pull/297.

In some cases it reports false positives, but those can be suppressed with
source code comments.
2022-03-24 11:13:50 +01:00
Patrick Ohly
0f4d0660a7 kube-scheduler: finish conversion to structured logging
Thanks to support for multi-line string values we can now also convert
these remaining klog.Info calls without making the output unreadable
in text format.

The debug log messages intentionally don't get changed to ensure that
developers looking for it still find it.

The output now looks like this:

I0322 11:44:46.715093  458409 configfile.go:96] "Using component config" config=<
	apiVersion: kubescheduler.config.k8s.io/v1beta2
	clientConnection:
	  acceptContentTypes: ""
	  burst: 100
	  contentType: application/vnd.kubernetes.protobuf
	  kubeconfig: /var/run/kubernetes/scheduler.kubeconfig
	  qps: 50
	enableContentionProfiling: true
 ...
	  schedulerName: default-scheduler
 >

I0322 11:45:08.695649  458409 comparer.go:42] "Cache comparer started"
I0322 11:45:08.695718  458409 comparer.go:67] "Cache comparer finished"
I0322 11:45:08.695820  458409 dumper.go:52] "Dump of cached NodeInfo" nodes=<
	Node name: 127.0.0.1
	Deleted: false
	Requested Resources: &{MilliCPU:0 Memory:0 EphemeralStorage:0 AllowedPodNumber:0 ScalarResources:map[]}
	Allocatable Resources:&{MilliCPU:36000 Memory:67019448320 EphemeralStorage:181555660500 AllowedPodNumber:110 ScalarResources:map[hugepages-1Gi:0 hugepages-2Mi:0]}
	Scheduled Pods(number: 0):
 >
I0322 11:45:08.695873  458409 dumper.go:62] "Dump of scheduling queue" pods=<
	name: coredns-6874cd75d4-fv6hv, namespace: kube-system, uid: f1df106f-7fd9-460d-8403-333df61b2751, phase: Pending, nominated node:
 >
2022-03-24 11:13:50 +01:00
Alex Wang
8a5df1302a rename unschedulableQ to unschedulablePods
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-03-24 17:38:49 +08:00
Kun Zhang
6f8e9aa05d Fixes exited messages when leaderelection lost 2022-03-24 17:33:16 +08:00
Kubernetes Prow Robot
14e8db067e
Merge pull request #108191 from ravisantoshgudimetla/wire-cert-contexts
Wire cert contexts
2022-03-23 11:20:17 -07:00
Kubernetes Prow Robot
de88dfcaf4
Merge pull request #108873 from saschagrunert/kubeadm-crictl-path
kubeadm: reuse found crictl path for exec
2022-03-22 12:22:11 -07:00
Kubernetes Prow Robot
e0b334f570
Merge pull request #105077 from marosset/windows-run-kubelet-in-job-object
Run kubelet in a job object in windows
2022-03-22 10:35:59 -07:00
Sascha Grunert
6b63231b7e
kubeadm: reuse found crictl path for exec
We now re-use the crictl tool path within the `ContainerRuntime` when
exec'ing into it. This allows introducing a convenience function to
create the crictl command and re-use it where necessary.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-03-22 14:03:57 +01:00
Wei Huang
d330f4dcb4
Fix a bug that out-of-tree plugin is misplaced when using scheduler v1beta3 config 2022-03-21 10:46:26 -07:00
Kubernetes Prow Robot
aface3ab99
Merge pull request #108761 from denkensk/set-flush-arg
Set PodMaxUnschedulableQDuration as 5 min
2022-03-17 20:15:39 -07:00
SataQiu
6c57e2fced kubeadm: fix the bug that windows node failed to join IPv6 cluster due to preflight failures
Signed-off-by: SataQiu <shidaqiu2018@gmail.com>
2022-03-17 22:07:08 +08:00
Alex Wang
e772202e95 set PodMaxUnschedulableQDuration as 5 min 2022-03-17 15:37:34 +08:00
Kubernetes Prow Robot
41b29e6542
Merge pull request #99287 from anfernee/clientip
Add HNS Load Balancer Healthchecks for ExternalTrafficPolicy: Local
2022-03-16 22:57:18 -07:00
Kubernetes Prow Robot
72a1dcb6e7
Merge pull request #108539 from ialidzhikov/cleanup/horizontal-pod-autoscaler-use-rest-clients
kube-controller-manager: Cleanup MarkDeprecared call for already removed flag
2022-03-15 16:09:59 -07:00
Mark Rossetti
f63a194d9e Run kubelet in a job object in windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-03-15 12:17:52 -07:00