mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #42237 from kargakis/remove-extra-deep-copy
Automatic merge from submit-queue controller: drop extra rs deep-copy @janetkuo @mwielgus
This commit is contained in:
commit
f22e621f7b
@ -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"
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user