@@ -203,16 +203,22 @@ type conversionClient struct {
203
203
v1client.ReplicationControllerInterface
204
204
}
205
205
206
- func (c conversionClient ) Create (ctx context.Context , rs * apps.ReplicaSet ) (* apps.ReplicaSet , error ) {
207
- return convertCall (ctx , c .ReplicationControllerInterface .Create , rs )
206
+ func (c conversionClient ) Create (ctx context.Context , rs * apps.ReplicaSet , opts metav1.CreateOptions ) (* apps.ReplicaSet , error ) {
207
+ return convertCall (func (rc * v1.ReplicationController ) (* v1.ReplicationController , error ) {
208
+ return c .ReplicationControllerInterface .Create (ctx , rc , opts )
209
+ }, rs )
208
210
}
209
211
210
- func (c conversionClient ) Update (ctx context.Context , rs * apps.ReplicaSet ) (* apps.ReplicaSet , error ) {
211
- return convertCall (ctx , c .ReplicationControllerInterface .Update , rs )
212
+ func (c conversionClient ) Update (ctx context.Context , rs * apps.ReplicaSet , opts metav1.UpdateOptions ) (* apps.ReplicaSet , error ) {
213
+ return convertCall (func (rc * v1.ReplicationController ) (* v1.ReplicationController , error ) {
214
+ return c .ReplicationControllerInterface .Update (ctx , rc , opts )
215
+ }, rs )
212
216
}
213
217
214
- func (c conversionClient ) UpdateStatus (ctx context.Context , rs * apps.ReplicaSet ) (* apps.ReplicaSet , error ) {
215
- return convertCall (ctx , c .ReplicationControllerInterface .UpdateStatus , rs )
218
+ func (c conversionClient ) UpdateStatus (ctx context.Context , rs * apps.ReplicaSet , opts metav1.UpdateOptions ) (* apps.ReplicaSet , error ) {
219
+ return convertCall (func (rc * v1.ReplicationController ) (* v1.ReplicationController , error ) {
220
+ return c .ReplicationControllerInterface .UpdateStatus (ctx , rc , opts )
221
+ }, rs )
216
222
}
217
223
218
224
func (c conversionClient ) Get (ctx context.Context , name string , options metav1.GetOptions ) (* apps.ReplicaSet , error ) {
@@ -236,7 +242,7 @@ func (c conversionClient) Watch(ctx context.Context, opts metav1.ListOptions) (w
236
242
return nil , errors .New ("Watch() is not implemented for conversionClient" )
237
243
}
238
244
239
- func (c conversionClient ) Patch (ctx context.Context , name string , pt types.PatchType , data []byte , subresources ... string ) (result * apps.ReplicaSet , err error ) {
245
+ func (c conversionClient ) Patch (ctx context.Context , name string , pt types.PatchType , data []byte , opts metav1. PatchOptions , subresources ... string ) (result * apps.ReplicaSet , err error ) {
240
246
// This is not used by RSC.
241
247
return nil , errors .New ("Patch() is not implemented for conversionClient" )
242
248
}
@@ -246,7 +252,7 @@ func (c conversionClient) GetScale(ctx context.Context, name string, options met
246
252
return nil , errors .New ("GetScale() is not implemented for conversionClient" )
247
253
}
248
254
249
- func (c conversionClient ) UpdateScale (ctx context.Context , name string , scale * autoscalingv1.Scale ) (result * autoscalingv1.Scale , err error ) {
255
+ func (c conversionClient ) UpdateScale (ctx context.Context , name string , scale * autoscalingv1.Scale , opts metav1. UpdateOptions ) (result * autoscalingv1.Scale , err error ) {
250
256
// This is not used by RSC.
251
257
return nil , errors .New ("UpdateScale() is not implemented for conversionClient" )
252
258
}
@@ -275,12 +281,12 @@ func convertList(rcList *v1.ReplicationControllerList) (*apps.ReplicaSetList, er
275
281
return rsList , nil
276
282
}
277
283
278
- func convertCall (ctx context. Context , fn func (context. Context , * v1.ReplicationController ) (* v1.ReplicationController , error ), rs * apps.ReplicaSet ) (* apps.ReplicaSet , error ) {
284
+ func convertCall (fn func (* v1.ReplicationController ) (* v1.ReplicationController , error ), rs * apps.ReplicaSet ) (* apps.ReplicaSet , error ) {
279
285
rc , err := convertRStoRC (rs )
280
286
if err != nil {
281
287
return nil , err
282
288
}
283
- result , err := fn (ctx , rc )
289
+ result , err := fn (rc )
284
290
if err != nil {
285
291
return nil , err
286
292
}
0 commit comments