Commit graph

275 commits

Author SHA1 Message Date
Kubernetes Prow Robot
df9a0bda18
Merge pull request #133797 from tico88612/cleanup/new-fake-with-options
Replace apimachinery/pkg/watch.NewFake with NewFakeWithOptions in pkg/controller
2026-01-08 03:01:38 +05:30
Kubernetes Prow Robot
41673c7198
Merge pull request #134910 from tchap/kcm-controllers-thread-mgmt
pkg/controller: Improve goroutine management
2025-11-03 17:58:03 -08:00
Ondra Kupka
91cf8253a2 controller/replicaset: Improve goroutine mgmt
Make sure all threads are terminated when Run returns.
2025-10-29 19:04:37 +01:00
Kubernetes Prow Robot
a8a43a5e25
Merge pull request #134795 from aditigupta96/fix-runwithcontext-controller-tests
pkg/controller: Use informer.RunWithContext in tests
2025-10-29 07:14:04 -07:00
Kubernetes Prow Robot
f051670a47
Merge pull request #133087 from atiratree/terminating-replicas-beta
promote DeploymentReplicaSetTerminatingReplicas to Beta
2025-10-27 04:47:37 -07:00
Aditi Gupta
fa59ed7f82 pkg/controller: Use informer.RunWithContext in tests 2025-10-22 14:13:30 -07:00
Jordan Liggitt
91d135f344
Include relevant dimensions in pod controller indexing 2025-10-16 13:27:50 -04:00
Filip Křepinský
dd3a713f6c fix ReplicaSet and Deployment tests for DeploymentReplicaSetTerminatingReplicas FG enablement 2025-10-10 21:47:02 +02:00
Aditi Gupta
af231d2153 Replace WaitForNamedCacheSync with WaitForNamedCacheSyncWithContext in pkg/controller/ 2025-09-16 14:51:34 -07:00
ChengHao Yang
ef96d9cbd2
Replace NewFake with NewFakeWithOptions in pkg/controller
CreateTestClient add the argument logger for support contextual logging

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2025-09-11 08:39:49 +08:00
Filip Křepinský
2cb48f77f0 schedule pod availability checks at the correct time in ReplicaSets 2025-07-23 18:58:57 +02:00
PatrickLaabs
baf71997f5 chore: depr. pointer pkg replacement for pkg/controller 2025-07-07 13:22:36 +02:00
Michal Wozniak
ac86e67b7d Commonize filtering of Pods by Owner with all orphans in namespace 2025-06-30 08:07:21 +02:00
xigang
66c611125c Add namespace-aware orphan pod indexing
Signed-off-by: xigang <wangxigang2014@gmail.com>
2025-06-19 16:32:20 +08:00
Filip Křepinský
bdfa8839be calculateStatus should use the same now time point for each pod
make IsPodAvailable time check inclusive
2025-06-14 18:39:15 +02:00
Kubernetes Prow Robot
089849ac22
Merge pull request #131822 from atiratree/replicationcontroller-terminating-replicas
disable terminatingReplicas reconciliation in ReplicationController
2025-06-10 15:17:01 -07:00
Filip Křepinský
b7d16fea7f disable terminatingReplicas reconciliation in ReplicationController 2025-05-30 21:08:12 +02:00
Filip Křepinský
aac00c1f0e add orphanedPods parameter to getRSPods
and improve code flow in syncReplicaSet
2025-05-29 10:50:32 +02:00
Harish Kuna
e42aba6c0c Optimize RS Controller Performance: Reduce Work Duration Time & Minimize Cache Locking 2025-05-12 19:56:46 +00:00
Filip Křepinský
8db1426554 rename DeploymentPodReplacementPolicy FG to DeploymentReplicaSetTerminatingReplicas 2025-03-27 20:27:44 +01:00
Feruzjon Muyassarov
4c6971007b
Refine logging levels in Job, IPAM, and ReplicaSet controllers.
Adjust logging levels in Job, IPAM, and ReplicaSet controllers from
V(0) to V(2), V(4), V(4) respectively to reduce noise. These logs
provide minimal value at the debug level (V(0)), so they have been
adjusted for better log clarity

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@est.tech>
2025-03-11 10:25:16 +02:00
Filip Křepinský
dc1914c61c ReplicaSet controller should count terminating pods in the status 2025-01-23 22:26:34 +01:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Joe Betz
2595aa1309 generate 2024-09-03 14:26:26 -04:00
Alvaro Aleman
6d0ac8c561 Use the generic/typed workqueue throughout
This change makes us use the generic workqueue throughout the project in
order to improve type safety and readability of the code.
2024-05-04 14:33:12 -04:00
Mengjiao Liu
b584b87a94 kube-controller-manager: readjust log verbosity
- Increase the global level for broadcaster's logging to 3 so that users can ignore event messages by lowering the logging level. It reduces information noise.
- Making sure the context is properly injected into the broadcaster, this will allow the -v flag value to be used also in that broadcaster, rather than the above global value.
- test: use cancellation from ktesting
- golangci-hints: checked error return value
2024-02-26 14:51:56 +08:00
weilaaa
eb8f3f194f use build-in max and min func to instead of k8s.io/utils/integer funcs 2023-12-15 15:09:11 +08:00
Kubernetes Prow Robot
cdd20eebb7
Merge pull request #118381 from SataQiu/fix-controller-20230601
controller: fix the help information format of sorting_deletion_age_ratio metric
2023-10-24 15:04:25 +02:00
Patrick Ohly
7d064812bb kube-controller-manager: finish conversion to contextual logging
This removes all exceptions and fixes the remaining unconverted log calls.
2023-07-12 14:57:29 +02:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
SataQiu
01861282b1 controller: fix the help information format of sorting_deletion_age_ratio metric 2023-06-01 23:28:42 +08:00
Naman Lakhwani
8f45b64c93
Migrated pkg/controller/replicaset to contextual logging (#114871)
* migrated controller/replicaset to contextual logging

Signed-off-by: Naman <namanlakhwani@gmail.com>

* small nits

Signed-off-by: Naman <namanlakhwani@gmail.com>

* addressed changes

Signed-off-by: Naman <namanlakhwani@gmail.com>

* small nit

Signed-off-by: Naman <namanlakhwani@gmail.com>

* taking t as input

Signed-off-by: Naman <namanlakhwani@gmail.com>

---------

Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-03-07 04:19:51 -08:00
Kubernetes Prow Robot
98742f9d77
Merge pull request #110747 from harshanarayana/cleanup/GIT-110737/logging-improvements
structured-logging: replace KObjs with KObjSlice for logging
2022-11-03 00:49:34 -07:00
Kubernetes Prow Robot
28ced69b76
Merge pull request #113054 from logicalhan/proxy-metric
remove rate limiter metric as it is not in use
2022-10-17 11:09:18 -07:00
Kubernetes Prow Robot
5c36a3c372
Merge pull request #110902 from 0xff-dev/master
convert int32 to pointer using library function
2022-10-14 08:48:46 -07:00
Han Kang
2bbd445f50 remove rate limiter metric as it is not in use
Change-Id: I91157653e3860eeecc3f572aee88da6ffc65faed
2022-10-13 13:07:11 -07:00
cndoit18
ec43037d0f style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2022-08-25 12:07:36 +08:00
0xff-dev
0a77a9122f convert int32 to pointer using library function 2022-07-01 14:58:26 +08:00
Harsha Narayana
c3cbc443ef
structured-logging: replace KObjs with KObjSlice for logging 2022-07-01 09:52:07 +05:30
Wojciech Tyczyński
11b679c66a Fix event broadcaster shutdown in multiple controllers 2022-05-17 22:14:19 +02:00
Kubernetes Prow Robot
13ebb2e757
Merge pull request #99488 from chymy/rc-test-bug
Fix pkg/controller/replicaset/replica_set_test.go variable reference error
2022-03-26 11:45:21 -07:00
Kubernetes Prow Robot
973e77ceb1
Merge pull request #102330 from tnqn/replicaset-optimization
Add controllerUID index to improve ReplicaSetController performance
2022-02-10 10:15:46 -08:00
Jordan Liggitt
c0af728f43 Handle invalid selectors properly 2022-01-14 12:11:02 -05: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
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
Mike Dame
80c01707e0
Wire contexts to Batch controllers (#105491)
* Wire contexts to Batch controllers

* (hold) feedback + updates that overlap with Apps controllers

* fixup errors
2021-11-10 14:56:46 -08:00
Mike Dame
41fcb95f2f Wire contexts to Apps controllers 2021-10-13 16:32:13 -04: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