Commit Graph

152 Commits

Author SHA1 Message Date
Jingyuan Liang
9f5c5b82a9 kubelet: Keep trying fast status update at startup until node is ready 2022-11-09 15:55:20 +00:00
David Ashpole
64af1adace
Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
Antonio Ojea
9c2b333925 Revert "plumb context from CRI calls through kubelet"
This reverts commit f43b4f1b95.
2022-11-02 13:37:23 +00:00
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00: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
0dc32b10fe
Merge pull request #110774 from kinvolk/rata/kubelet-short-tests
pkg/kubelet: skip long test on short mode
2022-07-07 20:36:05 -07:00
Abirdcfly
2bca77a3d9 Update golangci-lint to 1.46.2 and fix errors
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-29 17:42:46 +08:00
Rodrigo Campos
466c4d24a9 pkg/kubelet: skip long test on short mode
When adding functionality to the kubelet package and a test file, is
kind of painful to run unit tests today locally.

We usually can't run specifying the test file, as if xx_test.go and
xx.go use the same package, we need to specify all the dependencies. As
soon as xx.go uses the Kuebelet type (we need to do that to fake a
kubelet in the unit tests), this is completely impossible to do in
practice.

So the other option is to run the unit tests for the whole package or
run only a specific funtion. Running a single function can work in some
cases, but it is painful when we want to test all the functions we
wrote. On the other hand, running the test for the whole package is very
slow.

Today some unit tests try to connect to the API server (with retries)
create and list lot of pods/volumes, etc. This makes running the unit
test for the kubelet package slow.

This patch tries to make running the unit test for the whole package
more palatable. This patch adds a skip if the short version was
requested (go test -short ...), so we don't try to connect
to the API server or skip other slow tests.

Before this patch running the unit tests took in my computer (I've run
it several times so the compilation is already done):

	$ time go test -v
	real	0m21.303s
	user	0m9.033s
	sys	0m2.052s

With this patch it takes ~1/3 of the time:

	$ time go test -short -v
	real	0m7.825s
	user	0m9.588s
	sys	0m1.723s

Around 8 seconds is something I can wait to run the tests :)

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-06-24 18:00:21 +02:00
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
ravisantoshgudimetla
02c1bac0b6 [kubelet]: Sync label periodically 2021-11-05 18:47:43 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Michael Beaumont
a5a6762d33
Move pkg/kubelet/apis to k8s.io/kubelet/pkg/apis 2021-02-09 21:37:39 +01:00
Kubernetes Prow Robot
e40cba59e3
Merge pull request #95269 from SataQiu/kubelet-20201003
Fix panic when kubelet register if a node object already exists with no Status.Capacity or Status.Allocatable
2020-12-08 16:29:19 -08:00
Jordan Liggitt
5c88880584 Restore beta os/arch labels on initial node registration 2020-11-23 11:23:59 -05:00
SataQiu
c73ea0a2c3 fix the panic when kubelet registers if a node object already exists with no Status.Capacity or Status.Allocatable
Signed-off-by: SataQiu <1527062125@qq.com>
2020-11-06 17:10:45 +08:00
Tim Hockin
819ff9b087
Use topology labels instead of old beta names (#96033)
* Rename const for topology.../zone

* Rename const for topology.../region

* Rename const for failure-domain.../zone

* Rename const for failure-domain.../region

* Restore old names for compat
2020-11-05 20:26:50 -08:00
Kubernetes Prow Robot
2e59a17dc1
Merge pull request #92288 from zhijianli88/cleanup-tempfiles
Cleanup tempfiles
2020-08-27 17:56:54 -07:00
Jordan Liggitt
b181c76cbd Deflake TestUpdateNodeStatusWithLease - guard cached machineInfo 2020-08-05 10:00:36 -04:00
Kubernetes Prow Robot
dcdeed97cd
Merge pull request #91499 from lo24/intf-fix
fix a regression that TestValidateNodeIPParam never actually works
2020-06-30 02:52:05 -07:00
Li Zhijian
02eaa4f354 cleanup tempfiles in unit test
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-06-23 11:47:18 +08:00
Kubernetes Prow Robot
8ce1b535ee
Merge pull request #80831 from odinuge/hugetlb-pagesizes-cleanup
Add support for removing unsupported huge page sizes
2020-06-04 23:41:43 -07:00
lo24
cda593e822 fix TestValidateNodeIPParam: break was being used instead of continue 2020-05-28 13:47:33 +00:00
Kubernetes Prow Robot
cb493760d8
Merge pull request #89730 from saschagrunert/sprintf
Remove unnecessary sprintf in node status tests
2020-05-16 16:09:50 -07:00
wawa0210
54c0f8b677
Remove the 'beta' version of the node label (os and arch types) 2020-05-13 22:51:52 +08:00
Sascha Grunert
2dfb22b5b7
Remove unnecessary sprintf in node status tests
There is no invocation to sprintf needed for those strings so we can
remove them.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-04-01 14:16:28 +02:00
Odin Ugedal
2830827442
Add support for removing unsupported huge page sizes
When kubelet is restarted, it will now remove the resources for huge
page sizes no longer supported. This is required when:
- node disables huge pages
- changing the default huge page size in older versions of linux
(because it will then only support the newly set default).
- Software updates that change what sizes are supported (eg. by changing
boot parameters).
2020-03-19 13:08:08 +01:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Kubernetes Prow Robot
9cf309ed59
Merge pull request #82049 from andrewsykim/ga-node-instance-type-label
Promote Node Instance Type Label to GA
2019-11-08 13:47:58 -08:00
Kubernetes Prow Robot
ae15368355
Merge pull request #84351 from wojtek-t/promote_node_lease_to_GA
Promote node lease to GA
2019-11-08 09:00:15 -08:00
Andrew Sy Kim
17d8928dc9 kubelet: add unit tests for backfilling stable os/arch/zone/region/instance-type labels
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-08 10:43:50 -05:00
Andrew Sy Kim
7ddedf5034 kubelet: apply both beta and stable instance-type label
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-08 10:29:45 -05:00
Andrew Sy Kim
4c194d52da kubelet: set both deprecated Beta and GA labels for zone/region topology from the cloud provider
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-07 21:22:04 -05:00
Wei Huang
dd74205bcf
Move out const strings in pkg/scheduler/api/well_known_labels.go 2019-11-05 20:56:21 -08:00
wojtekt
ffad401b4e Promote NodeLease feature to GA 2019-11-05 09:01:12 +01:00
draveness
1163a1d51e feat: update taint nodes by condition to GA 2019-10-19 09:17:41 +08:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
David Zhu
f15cc60957 Update golang scientific notation using hack/update-gofmt.sh 2019-09-12 18:05:49 -07:00
Tim Allclair
a2c51674cf Cleanup more static check issues (S1*,ST*) 2019-08-21 10:40:21 -07:00
Tim Allclair
6510d26b6a Fix misc static check issues 2019-08-21 10:40:21 -07:00
Tim Allclair
3f510c69f6 Remove dead code from pkg/kubelet/... 2019-08-21 10:40:21 -07:00
Aldo Culquicondor
a626a2972e Fix/Add comments on cadvisor implementations
Fix lint issues.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-29 09:31:35 -04:00
Kubernetes Prow Robot
c8cee54240
Merge pull request #79391 from danwinship/nodeaddresses-update-fix
Don't use strategic merge patch on Node.Status.Addresses
2019-07-02 21:08:29 -07:00
Dan Winship
05a9634fb3 Hack PatchNodeStatus() to override the patch type on Status.Addresses 2019-07-02 19:16:30 -04:00
Khaled Henidak(Kal)
dba434c4ba kubenet for ipv6 dualstack 2019-07-02 22:26:25 +00:00
Richard Chen
c9f1b57b5b Reset extended resources only when node is recreated. 2019-05-21 14:16:54 -07:00
Andrew Kim
c919139245 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate 2019-05-08 10:01:50 -04:00
Davanum Srinivas
7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
qingsenLi
147666f10f spelling error 'heatbeat' 2019-03-09 00:22:06 +08:00
Kubernetes Prow Robot
3e748958dc
Merge pull request #73333 from yujuhong/os-arch-labels
kubelet: promote OS & arch labels to GA
2019-02-15 16:45:57 -08:00