Commit Graph

166 Commits

Author SHA1 Message Date
kerthcet
b4277e7ce4 Fix potential goroutine leakages in taint manager tests
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-08-04 00:00:48 +08:00
Michal Wozniak
04fcbd721c Introduction of a pod condition type indicating disruption. Its reason field indicates the reason:
- PreemptionByKubeScheduler (Pod preempted by kube-scheduler)
- DeletionByTaintManager (Pod deleted by taint manager due to NoExecute taint)
- EvictionByEvictionAPI (Pod evicted by Eviction API)
- DeletionByPodGC (an orphaned Pod deleted by PodGC)PreemptedByScheduler (Pod preempted by kube-scheduler)
2022-08-02 11:12:16 +02: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
a6afdf45dd
Merge pull request #110359 from MadhavJivrajani/remove-api-call-under-lock
controller/nodelifecycle: Refactor to not make API calls under lock
2022-07-25 06:20:34 -07:00
Madhav Jivrajani
3c0bc26d90 controller/nodelifecycle: Refactor to not make API calls under lock
The evictorLock only protects zonePodEvictor and zoneNoExecuteTainter.
processTaintBaseEviction showed indications of increased lock contention
among goroutines (see issue 110341 for more details).

The refactor done is to ensure that all codepaths in that function that
hold the evictorLock AND make API calls under the lock, are now making
API calls outside the lock and the lock is held only for accessing either
zonePodEvictor or zoneNoExecuteTainter or both.

Two other places where the refactor was done is the doEvictionPass and
doNoExecuteTaintingPass functions which make multiple API calls under
the evictorLock.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2022-07-25 15:16:26 +05:30
Michal Wozniak
4ec8cf08da This PR refactors taint_manager to eliminate the getPod and getNode stubs. 2022-07-14 18:00:44 +02:00
Wojciech Tyczyński
006ff4510b Clean shutdown of nodecontroller integration tests 2022-06-06 20:33:20 +02:00
Kubernetes Prow Robot
fcffb6de7e
Merge pull request #108089 from mysunshine92/nodeController-20220212
fix typo for nodelifecycle controller
2022-05-07 03:33:18 -07:00
Kubernetes Prow Robot
f979b4094e
Merge pull request #99292 from yangjunmyfm192085/run-test23
replace all occurrences of "node", nodeName to "node", klog.KRef("", nodeName)
2022-03-17 12:22:42 -07:00
wangyamei
3808e193d9 fix typo for nodelifecycle controller 2022-02-28 14:30:28 +08:00
Kubernetes Prow Robot
3bd422dc76
Merge pull request #107293 from dims/jan-1-owners-cleanup
Cleanup OWNERS files - Jan 2021 Week 1
2022-01-13 10:30:30 -08:00
Patrick Ohly
9eaa2dc554 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.
2022-01-12 07:48:36 +01:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
JUN YANG
13fa2b1949 replace all occurrences of "node", nodeName to "node", klog.KRef("", nodeName) 2022-01-06 21:19:29 +08:00
Kubernetes Prow Robot
1426587e08
Merge pull request #106436 from dims/cleanup-owners-files-no-activity-in-a-year
Cleanup OWNERS files (No Activity in the last year)
2021-12-15 12:07:51 -08:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05:00
Kubernetes Prow Robot
ba200841fd
Merge pull request #106366 from cyclinder/evictions_number_stable
adding evictions_total metric and marking evictions_number deprecated
2021-12-12 23:19:59 -08:00
cyclinder
b88b51c6e5 adding evictions_total metric and marking evictions_number deprecated
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-13 10:36:02 +08:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Neha Lohia
fa1b6765d5
move pkg/util/node to component-helpers/node/util (#105347)
Signed-off-by: Neha Lohia <nehapithadiya444@gmail.com>
2021-11-12 07:52:27 -08:00
Mike Dame
4960d0976a Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
Kubernetes Prow Robot
519b164db1
Merge pull request #105222 from cyclinder/remove_node_lease_GA
remove nodeLease feature GA
2021-10-05 05:41:21 -07:00
Author cyclinder
e61b901628 remove nodeLease feature GA
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2021-10-05 12:23:27 +08:00
haoyun
8d9fa1decc fix: use k8s.io/utils/clock instead
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-10-02 00:08:53 +08:00
wojtekt
e233feb99b Migrate to k8s.io/utils/clock in pkg/controller 2021-09-10 11:42:32 +02:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Kubernetes Prow Robot
9067b5691d
Merge pull request #97818 from damemi/remove-util-node-dep
Scheduler: remove direct dependency for k8s.io/kubernetes/pkg/util/node
2021-03-05 04:06:32 -08:00
Mike Dame
af045087d9 Move GetZoneKey function to component-helpers 2021-03-04 10:32:38 -05:00
Sergey Kanzhelev
d24ed4ace1 sped up scheduler tests by using fake clock 2021-03-03 19:12:53 +00:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Kubernetes Prow Robot
031f2afbba
Merge pull request #98931 from michaelbeaumont/kubelet_well_known
Move pkg/kubelet/apis to k8s.io/kubelet/pkg/apis
2021-02-20 11:55:41 -08:00
Nikhita Raghunath
b11516d69f *: move gmarek to emeritus_approvers 2021-02-16 10:59:19 +05:30
Michael Beaumont
a5a6762d33
Move pkg/kubelet/apis to k8s.io/kubelet/pkg/apis 2021-02-09 21:37:39 +01:00
tanjing2020
e144c4e1e9 migrate scheduler/taint_manager.go structured logging 2021-01-25 10:06:41 +08:00
Kubernetes Prow Robot
1209c59612
Merge pull request #96876 from howieyuen/no-execute-taint-missing
fix nodelifecyle controller not add NoExecute taint bug
2021-01-13 14:17:03 -08:00
pacoxu
441985afb6 set LegacyNodeRoleBehavior to false and mv ServiceNodeExclusion to GA
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-01-05 22:34:18 +08:00
Hao Yuan
5569db4902 fix nodelifecyle controller not add NoExecute taint bug 2020-12-14 09:34:57 +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
Jordan Liggitt
892bdf9a15 Do not evict pods which tolerate all NoExecute taints 2020-08-05 12:50:43 -04:00
Kobayashi Daisuke
4ae11dac2e Replace StartLogging(klog.Infof) with StartStructuredLogging(0) 2020-06-15 17:48:35 +09: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
wawa0210
54c0f8b677
Remove the 'beta' version of the node label (os and arch types) 2020-05-13 22:51:52 +08:00
Kubernetes Prow Robot
85ee5fdd90
Merge pull request #87743 from u2takey/master
log pod event when node not ready
2020-04-21 17:25:52 -07:00
leiiwang
c6c18c8fed event pod event when node not ready 2020-04-07 18:24:00 +08:00
kaiyuechen
b3637c9670 Reconcile NoExecute Taint 2020-03-13 11:44:12 +08:00
skilxn-go
6b8fc8dc5e Move TaintBasedEvictions feature gates to GA 2020-03-09 10:49:00 +08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
taesun_lee
79680b5d9b Fix pkg/controller typos in some error messages, comments etc
- applied review results by LuisSanchez
- Co-Authored-By: Luis Sanchez <sanchezl@redhat.com>

genernal -> general
iniital -> initial
initalObjects -> initialObjects
intentionaly -> intentionally
inforer -> informer
anotother -> another
triger -> trigger
mutli -> multi
Verifyies -> Verifies
valume -> volume
unexpect -> unexpected
unfulfiled -> unfulfilled
implenets -> implements
assignement -> assignment
expectataions -> expectations
nexpected -> unexpected
boundSatsified -> boundSatisfied
externel -> external
calcuates -> calculates
workes -> workers
unitialized -> uninitialized
afater -> after
Espected -> Expected
nodeMontiorGracePeriod -> NodeMonitorGracePeriod
estimateGrracefulTermination -> estimateGracefulTermination
secondrary -> secondary
ShouldRunDaemonPodOnUnscheduableNode -> ShouldRunDaemonPodOnUnschedulableNode
rrror -> error
expectatitons -> expectations
foud -> found
epackage -> package
succesfulJobs -> successfulJobs
namesapce -> namespace
ConfigMapResynce -> ConfigMapResync
2020-02-27 00:15:33 +09:00
Mike Danese
bfc75d9a5c manual fixes 2020-02-08 12:32:33 -05:00