mirror of https://github.com/k3s-io/k3s
![]() 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 ``` |
||
---|---|---|
.. | ||
util | ||
BUILD | ||
OWNERS | ||
daemon_controller.go | ||
daemon_controller_test.go | ||
doc.go | ||
update.go | ||
update_test.go |