Commit Graph

122 Commits

Author SHA1 Message Date
Jordan Liggitt
78cb3862f1
Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05: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
Jordan Liggitt
a5d785fae8
Record metric for lifecycle fallback to http 2022-10-19 14:45:25 -04:00
Jordan Liggitt
122b43037e
Record event for lifecycle fallback to http 2022-10-19 14:11:36 -04:00
Billie Cleek
dfaaa144ab fallback to http when lifecycle handler request should have been https 2022-10-19 09:51:52 -07:00
Jason Simmons
5a6acf85fa Align lifecycle handlers and probes
Align the behavior of HTTP-based lifecycle handlers and HTTP-based
probers, converging on the probers implementation. This fixes multiple
deficiencies in the current implementation of lifecycle handlers
surrounding what functionality is available.

The functionality is gated by the features.ConsistentHTTPGetHandlers feature gate.
2022-10-19 09:51:52 -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
6a71632f65
Merge pull request #111239 from HecarimV/fix-22071914
fix: add pod info to the error log
2022-07-29 13:17:50 -07:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
HaoJie Liu
b058565f65
fix: add pod info to the error log
Signed-off-by: HaoJie Liu <liuhaojie@beyondcent.com>
2022-07-19 14:17:33 +08:00
Gunju Kim
eb4cd9ab4e
Check taint/toleration before accepting pods, except for static pods 2022-02-10 19:39:26 +09:00
Kubernetes Prow Robot
0dcd6eaa0d
Merge pull request #103934 from boenn/tainttoleration
De-duplicate predicate (known as filter now) logic shared in kubelet and scheduler
2022-02-09 16:53:46 -08:00
cyclinder
07999dac70 Clean up dockershim flags in the kubelet
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-14 16:02:50 +02:00
boenn
cec2aae1e5 rebase master 2021-11-25 11:21:12 +08:00
ravisantoshgudimetla
889d45d3fb [kubelet] Reject pods with OS field mismatch
Once kubernetes#104613 and kubernetes#104693
merge, we'll have OS field in pod spec. Kubelet should start rejecting pods
where pod.Spec.OS and node's OS(using runtime.GOOS) won't match
2021-11-08 19:18:15 -05:00
ravisantoshgudimetla
21c5c2ec5c [kubelet][podadmission]: Validate and reject pods with mismatching labels 2021-11-05 18:47:43 -04:00
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
Mike Dame
5a77ebe28b Scheduler: remove pkg/features dependency from NodeResources plugins 2021-05-18 08:59:02 -04:00
Kubernetes Prow Robot
9fc32e57fb
Merge pull request #101364 from markusthoemmes/consistent-kubelet-log
Consistently use log.KObj to format pods in logs
2021-05-03 17:21:11 -07:00
Jan Chaloupka
7286f9712a pkg/scheduler: drop Resource.ResourceList() method
The method is used only for testing purposes. Given Resource data type
exposes all its fields, any invoker of ResourceList that is still
using the method outside of kubernetes/kubernetes can still either
copy paste the original implementation or implement a custom method
that's converting resources into proper Quantity data type.

Given the hugepage resource is a scalar resource, it's sufficient
the underlying code under fit_test.go to take into account any
extended resources. For predicate_test.go, the hugepage
resource does not play any role as the General predicates test cases
does not set any scaler resource at all.

Additionally, by removing ResourceList method, pkg/scheduler/framework
can get rid of dependency on k8s.io/kubernetes/pkg/apis/core/v1/helper.
2021-04-28 16:26:33 +02:00
Markus Thömmes
168b6cf8a1 Consistently use log.KObj to format pods in logs 2021-04-22 12:14:44 +02:00
Kubernetes Prow Robot
5779fec3c4
Merge pull request #99959 from AliceZhang2016/nodeaffinity-cleanup
Move nodeaffinity helpers to component-helpers package
2021-04-21 17:03:53 -07:00
Kubernetes Prow Robot
bebb932bdf
Merge pull request #99479 from mengjiao-liu/migrate_to_structured_logs
Migrate `pkg/kubelet/lifecycle,oom` to structured logging
2021-03-11 17:28:33 -08:00
mengjiao.liu
e557f61784 Migrate pkg/kubelet/lifecycle,oom to structured logging
Co-authored-by: Elana Hashman <ehashman@users.noreply.github.com>
2021-03-11 13:36:48 +08:00
Mengxue Zhang
bdda9728e7 move nodeaffinity helpers to component-helpers package 2021-03-10 20:19:25 +00:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Aldo Culquicondor
3ce145787a Add AddedAffinity to the NodeAffinityArgs
And use it in Filter and Score.

Change-Id: I173d8f2d5578762e9873181d5b44ea30b6dbbbc2
2020-11-09 15:19:15 -05:00
Ali
bfdeda58b7 Delete framework/v1alpha1 folder and change remaining import paths 2020-10-23 13:16:13 +11:00
Kubernetes Prow Robot
70e09f2c24
Merge pull request #88842 from angao/fit-arg
add args for NodeResourcesFit plugin
2020-07-09 05:04:10 -07:00
Yan Yao
cef7876952 Fix golint failures in pkg/kubelet/lifecycle
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2020-06-20 18:44:54 -07:00
Sergey Kanzhelev
ee53488f19 fix golint issues in pkg/kubelet/container 2020-06-19 15:48:08 +00:00
Wen Gao
b21b298074 add arg for noderesourcesfit plugin to support ignore a group of extended resources 2020-06-10 10:52:54 +08:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Abdullah Gharaibeh
d6522e0e74 rename framework pkg with schedulerframework for all instances under pkg/kubelet 2020-04-14 14:24:07 -04:00
Abdullah Gharaibeh
bed9b2f23b Cleanup obsolete NodeInfo methods 2020-04-12 18:13:46 -04:00
shikanon
d09ce2d6ac fix typos error in pkg/kubelet/lifecycle 2020-02-25 01:21:27 +08:00
Abdullah Gharaibeh
0a476eb7d4 reduce overhead of error message formatting and allocation for scheudler NodeResource filter 2020-02-04 11:02:29 -05:00
Wei Huang
3f8b202266
Move GeneralPredicates logic to kubelet. 2020-01-21 09:27:00 -08:00
Abdullah Gharaibeh
70a2bccfd6 deprecate scheduler's FailureReason 2019-12-12 18:54:52 -05:00
Bernat Moix
fc8ea98890 kubelet: rename HTTPGetter interface 2019-11-08 18:18:59 +01:00
Tim Allclair
8a495cb5e4 Clean up error messages (ST1005) 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
Haiyan Meng
1f270ef4e2
Limit the read length of ioutil.ReadAll in pkg/kubelet and pkg/probe
Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-07-11 13:18:06 -07:00
Khaled Henidak(Kal)
dba434c4ba kubenet for ipv6 dualstack 2019-07-02 22:26:25 +00:00
wangqingcan
b82a1d4600 Move predicate types from algorithm to predicates 2018-12-21 22:26:47 +08:00
yuexiao-wang
7b6f60f085 modify BUILD
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:22:06 +08:00
yuexiao-wang
f3353c358d [scheduler cleanup phase 2]: Rename to
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:21:12 +08:00