kubernetes/pkg/controller
Matt Matejczyk 01ccd2e19e Optimize GetControllerOf method
In addition create a similar method that doesn't copy objects.

Benchmark for the new no-copy method vs the old one:
```
benchmark                       old ns/op     new ns/op     delta
BenchmarkGetControllerOf-12     214           14.8          -93.08%

benchmark                       old allocs     new allocs     delta
BenchmarkGetControllerOf-12     1              0              -100.00%

benchmark                       old bytes     new bytes     delta
BenchmarkGetControllerOf-12     80            0             -100.00%
```

Benchamrk for the new (copy) method vs the old one:
```
benchmark                       old ns/op     new ns/op     delta
BenchmarkGetControllerOf-12     128           114           -10.94%

benchmark                       old allocs     new allocs     delta
BenchmarkGetControllerOf-12     1              1              +0.00%

benchmark                       old bytes     new bytes     delta
BenchmarkGetControllerOf-12     80            80            +0.00%

```

Overall there is a 10% improvement for the old vs new (copy) method and
huge improvent (x10) for the old vs new (no-copy).

I changed the IsControlledBy and a few other methods to use the new (no-copy) method.
2019-09-25 15:07:37 +02:00
..
apis/config Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00
bootstrap move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
certificates add identification for particular certificate controllers 2019-09-03 14:05:04 -04:00
cloud init check for cloud node controller 2019-09-07 10:47:11 +08:00
clusterroleaggregation move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
cronjob Fix selflinks in tests 2019-08-01 15:50:03 +02:00
daemon move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
deployment move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
disruption Merge pull request #81527 from yastij/move-controller-util 2019-08-27 00:52:54 -07:00
endpoint Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00
endpointslice Fixing bugs related to Endpoint Slices 2019-09-04 09:09:32 -07:00
garbagecollector move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
history Optimize GetControllerOf method 2019-09-25 15:07:37 +02:00
job move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
namespace fix namespace termination conditions to be consistent and correct 2019-09-03 15:33:17 -04:00
nodeipam phase 2: generated items 2019-08-28 16:11:46 +00:00
nodelifecycle adding lock to node data map 2019-09-12 10:23:24 +02:00
podautoscaler Fix reviewer typo. 2019-09-06 12:09:50 +02:00
podgc optimize gc_controller.gcTerminated 2019-09-16 16:34:08 +08:00
replicaset move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
replication Updates OWNERS files and OWNERS_ALIASES for SIG Apps to make reviewers 2019-04-16 11:35:21 -07:00
resourcequota move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
route move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
service use directly DeletionHandlingMetaNamespaceKeyFunc from client-go 2019-08-29 11:51:14 +01:00
serviceaccount move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
statefulset move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
testutil cleanup: fix some log and error capitalizations 2019-07-20 18:26:16 -04:00
ttl move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
ttlafterfinished move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
util Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00
volume Update bazel by hack/update-bazel.sh 2019-09-12 16:05:21 +08:00
.import-restrictions Fixing bugs related to Endpoint Slices 2019-09-04 09:09:32 -07:00
BUILD Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00
client_builder_dynamic.go Migrate the controller to use TokenRequest and rotate token periodically 2019-03-25 14:54:22 +08:00
client_builder.go Migrate the controller to use TokenRequest and rotate token periodically 2019-03-25 14:54:22 +08:00
controller_ref_manager_test.go remove unused code of (pkg/controller) 2018-10-09 08:15:30 +08:00
controller_ref_manager.go Optimize GetControllerOf method 2019-09-25 15:07:37 +02:00
controller_utils_test.go 1. Fix lint errors for the whole directory staging/src/k8s.io/client-go/tools/cache; 2019-07-27 15:49:03 +08:00
controller_utils.go move WaitForCacheSync to the sharedInformer package 2019-08-22 16:13:41 +01:00
doc.go
informer_factory.go Use metadata informers instead of dynamic informers in controller manager 2019-07-11 12:18:52 -04:00
lookup_cache.go
OWNERS Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00