kubernetes/pkg/controller
MyoungHaSong 8e586c5071
Fix goroutine leaks in ephemeral volume controller test (#137970)
* Fix goroutine leaks in ephemeral volume controller test

Use context.WithCancel and properly shut down the informer factory
and workqueue in TestSyncHandler to prevent goroutine leaks.

Previously, the test used context.Background() which never cancels,
leaving informer and workqueue goroutines running after test completion.
Now that context support has been added to tools/cache (#126387),
the informers can be cleanly shut down via context cancellation.

Also add goleak.VerifyTestMain to detect goroutine leak regressions.

* Remove year from copyright header in main_test.go

* Drop main_test.go per review feedback
2026-04-23 04:15:52 +05:30
..
apis/config Make ConcurrentResourceClaimSyncs configurable (#134701) 2026-01-08 19:31:39 +05:30
bootstrap Move dump package from apimachinery to k8s.io/utils 2026-02-12 07:34:19 -05:00
certificates Remove redundant re-assignment in for-loops under pkg 2026-03-02 08:47:43 +01:00
clusterroleaggregation simplify cluster role aggregation and remove update path 2026-02-02 22:39:27 +00:00
cronjob check the job owner reference in the cronjob reconcile loop (#133313) 2026-04-23 03:18:49 +05:30
daemon Fix vet error 2026-03-05 18:11:02 -05:00
deployment Simplify deployment controller deletePod logic, drop network call (#136639) 2026-04-23 03:20:01 +05:30
devicetainteviction Workload API: PodGroup ResourceClaims (KEP-5729) 2026-03-22 14:52:45 -05:00
disruption Update pkg/controller to use slices.Contains 2026-02-26 10:17:13 +01:00
endpoint controller/endpoint: Improve goroutine mgmt 2025-10-29 19:00:31 +01:00
endpointslice Drop TopologyAwareHints and ServiceTraficDistribution feature gates 2026-01-09 12:42:34 -05:00
endpointslicemirroring Fix unit tests 2026-01-29 17:55:08 -05:00
garbagecollector Merge pull request #136817 from kairosci/fix-gc-notfound-136525 2026-03-11 03:53:09 +05:30
history Add index for controller revision 2026-01-13 19:46:34 +00:00
job remove accidently commited file 2026-04-04 12:53:30 +05:30
namespace controller/namespace: Improve goroutine mgmt 2025-10-29 19:04:37 +01:00
nodeipam nodeipam: buffer TestNodeSyncResync report notifications 2026-03-14 11:58:31 -04:00
nodelifecycle nodelifecycle: fix processing deleted pod events, which are currently missed 2026-01-31 10:49:15 +08:00
podautoscaler Adds polling for HPA reconciliation_duration unit test (#138059) 2026-04-07 21:45:33 +05:30
podgc controller/podgc: Improve goroutine mgmt 2025-10-29 19:04:37 +01:00
replicaset Add the ability for the replicaset controller to read its own writes 2026-02-25 17:15:53 +00:00
replication Add the ability for the replicaset controller to read its own writes 2026-02-25 17:15:53 +00:00
resourceclaim Workload API: PodGroup ResourceClaims (KEP-5729) 2026-03-22 14:52:45 -05:00
resourcepoolstatusrequest Pass individual informers, move DRA controllers to resource.go, simplify retry logic and metric tests 2026-03-19 16:50:03 +02:00
resourcequota Merge pull request #136040 from petern48/error-level-logs 2026-01-28 03:27:48 +05:30
scheduling/podgroupprotection Add new protection controller for PodGroup 2026-03-18 15:27:17 +00:00
serviceaccount golangci-lint: bump to logtools v0.10.1 2026-03-04 12:08:18 +01:00
servicecidrs Update pkg/controller to use slices.Contains 2026-02-26 10:17:13 +01:00
statefulset Parallel pod management should accordingly count old unavailable 2026-04-20 16:30:59 +02:00
storageversiongc Merge pull request #134432 from Karthik-K-N/fix-sv-test 2025-11-05 06:56:52 -08:00
storageversionmigrator Remove CRD stored versions from status upon SVM migration 2026-03-11 00:50:27 +00:00
tainteviction KEP-5471: Extend tolerations operators (#134665) 2025-11-10 12:42:54 -08:00
testutil Replace NewFake with NewFakeWithOptions in pkg/controller 2025-09-11 08:39:49 +08:00
ttl controller/ttl: Improve goroutine mgmt 2025-10-29 19:04:37 +01:00
ttlafterfinished controller/ttlafterfinished: Improve goroutine mgmt 2025-10-29 19:04:37 +01:00
util move protectionutil pkg to controller/util 2026-03-18 15:27:56 +00:00
validatingadmissionpolicystatus controller/validatingadmissionpolicystatus: Improve goroutine mgmt 2025-10-29 19:07:10 +01:00
volume Fix goroutine leaks in ephemeral volume controller test (#137970) 2026-04-23 04:15:52 +05:30
controller_ref_manager.go kube-controller-manager: finish conversion to contextual logging 2023-07-12 14:57:29 +02:00
controller_ref_manager_test.go Merge pull request #101250 from evertrain/master 2021-11-10 09:19:26 -08:00
controller_utils.go Add the ability for the job controller to read its own writes 2026-02-25 01:19:48 +00:00
controller_utils_test.go Add the ability for the job controller to read its own writes 2026-02-25 01:19:48 +00:00
doc.go remove import doc comments 2024-12-02 16:59:34 +01:00
OWNERS Add jefftree to OWNERS 2025-08-04 19:12:13 +00:00