Commit Graph

110 Commits

Author SHA1 Message Date
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
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Jess Frazelle
30dcca6233
ProcMount: add api options and feature gate
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 11:40:02 -04:00
Da K. Ma
a75d625cc3 Compared preemption by priority.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-08-04 11:33:07 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Guoliang Wang
761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Davanum Srinivas
4bacd77321 Remove unused code 2018-04-30 14:57:26 -04:00
Yang Guo
8d880506fe Support cluster-level extended resources in kubelet and kube-scheduler
Co-authored-by: Yang Guo <ygg@google.com>
Co-authored-by: Chun Chen <chenchun.feed@gmail.com>
2018-02-27 17:25:30 -08:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Jonathan Basseri
85c5862552 Fix scheduler refs in BUILD files.
Update references to moved scheduler code.
2018-01-05 15:05:01 -08:00
Jonathan Basseri
30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
lichuqiang
096cc665ff fix bug in container lifecycle event generation 2017-12-11 10:15:39 +08:00