Skip to content

Commit

Permalink
Merge pull request kubernetes#42237 from kargakis/remove-extra-deep-copy
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

controller: drop extra rs deep-copy

@janetkuo @mwielgus
  • Loading branch information
Kubernetes Submit Queue authored Mar 24, 2017
2 parents 5136922 + b29f7d0 commit f22e621
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/controller/replicaset/replica_set_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"
Expand All @@ -46,14 +45,6 @@ func updateReplicaSetStatus(c unversionedextensions.ReplicaSetInterface, rs *ext
return rs, nil
}

// deep copy to avoid mutation now.
// TODO this method need some work. Retry on conflict probably, though I suspect this is stomping status to something it probably shouldn't
copyObj, err := api.Scheme.DeepCopy(rs)
if err != nil {
return nil, err
}
rs = copyObj.(*extensions.ReplicaSet)

// Save the generation number we acted on, otherwise we might wrongfully indicate
// that we've seen a spec update when we retry.
// TODO: This can clobber an update if we allow multiple agents to write to the
Expand Down

0 comments on commit f22e621

Please sign in to comment.