Use deep copy for merging list of objects
Summary
This fix removes the unnecessary updates that happen repeatedly in the reconcile loop.
Diagnosis
These updates occur when there is a difference between the existing object and its templated (source) copy. The existing objects are adjusted by other controllers, including admission controllers, e.g. by adding default values. Therefore the change to the templated copy is certain. This will cause the repeated updated.
Cause
The current merge logic replaces the existing list items with the their templated counterparts causing an unnecessary patch to be applied on these objects.
Fix
This fix with ensure that the merge logic uses deep copy on lists and traverses into each item when merging the existing and templated copies.
Closes #190 (closed)
Edited by Hossein Pursultani