Currently, we are storing the CR in resource.Cluster object and changing this CR during the course of reconcile and at last call the update function. This causes the object has been already modified, please apply your changes to the latest version and try again
With this change, we take the copy of the object before reconcile, run the changes on our CR, then patch will take diff for the before and after of object to find only the changed fields. This patch operation is more safer in terms of updating the CR.
With this change, cluster is in correct state after crdb is provisioned:
Fixes #951
Currently, we are storing the CR in resource.Cluster object and changing this CR during the course of reconcile and at last call the update function. This causes the
object has been already modified, please apply your changes to the latest version and try again
With this change, we take the copy of the object before reconcile, run the changes on our CR, then patch will take diff for the before and after of object to find only the changed fields. This patch operation is more safer in terms of updating the CR.
With this change, cluster is in correct state after crdb is provisioned: