mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
generated: run refactor
This commit is contained in:
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package replicaset
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
@@ -63,7 +64,7 @@ func updateReplicaSetStatus(c appsclient.ReplicaSetInterface, rs *apps.ReplicaSe
|
||||
fmt.Sprintf("sequence No: %v->%v", rs.Status.ObservedGeneration, newStatus.ObservedGeneration))
|
||||
|
||||
rs.Status = newStatus
|
||||
updatedRS, updateErr = c.UpdateStatus(rs)
|
||||
updatedRS, updateErr = c.UpdateStatus(context.TODO(), rs)
|
||||
if updateErr == nil {
|
||||
return updatedRS, nil
|
||||
}
|
||||
@@ -72,7 +73,7 @@ func updateReplicaSetStatus(c appsclient.ReplicaSetInterface, rs *apps.ReplicaSe
|
||||
break
|
||||
}
|
||||
// Update the ReplicaSet with the latest resource version for the next poll
|
||||
if rs, getErr = c.Get(rs.Name, metav1.GetOptions{}); getErr != nil {
|
||||
if rs, getErr = c.Get(context.TODO(), rs.Name, metav1.GetOptions{}); getErr != nil {
|
||||
// If the GET fails we can't trust status.Replicas anymore. This error
|
||||
// is bound to be more interesting than the update failure.
|
||||
return nil, getErr
|
||||
|
||||
Reference in New Issue
Block a user