controllers: simplify deepcopy calls

This commit is contained in:
Dr. Stefan Schimanski
2017-08-15 14:14:21 +02:00
parent 28f6b3fcc0
commit 1d053c4f7c
50 changed files with 86 additions and 475 deletions

View File

@@ -621,11 +621,7 @@ func (rm *ReplicationManager) syncReplicationController(key string) error {
}
trace.Step("manageReplicas done")
copy, err := scheme.Scheme.DeepCopy(rc)
if err != nil {
return err
}
rc = copy.(*v1.ReplicationController)
rc = rc.DeepCopy()
newStatus := calculateStatus(rc, filteredPods, manageReplicasErr)