k3s/pkg/controller/daemon
Kubernetes Submit Queue e6f64d0a79
Merge pull request #64916 from mfojtik/ds-01-improve-mem-usage
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

improve memory footprint of daemonset simulate

**What this PR does / why we need it**:

This is an alternative for https://github.com/kubernetes/kubernetes/pull/64915 (it might be not needed if that PR will merge)

During memory profiling of OpenShift, we noticed a significant amount of object allocations done by `IsControlledBy()`. @sttts found that the `GetObjectReferences()` method is doing a deep-copy of the object references. 

![screen shot 2018-06-08 at 14 22 59](https://user-images.githubusercontent.com/44136/41157922-7af953f2-6b27-11e8-9a16-bda8c3edfe07.png)

This PR simplify the `IsControlledBy()` to just iterate over the ownerRefs, without copying them. 

**Release note**:

```release-note
NONE
```
2018-06-11 08:56:20 -07:00
..
util Updated helper funcs to use nodename. 2018-06-02 08:38:58 +08:00
BUILD improve memory footprint of daemonset simulate 2018-06-08 19:59:12 +02:00
OWNERS Volunteer to be reviewer of DaemonSet 2017-10-23 06:32:21 -05:00
daemon_controller.go Merge pull request #64916 from mfojtik/ds-01-improve-mem-usage 2018-06-11 08:56:20 -07:00
daemon_controller_test.go update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
update.go Update the DaemonSet controller to use the apps/v1 API 2018-02-22 11:38:54 -08:00
update_test.go Update the DaemonSet controller to use the apps/v1 API 2018-02-22 11:38:54 -08:00