@@ -270,48 +270,48 @@ func (c *workloads) Update(ctx context.Context, w *v1.Workload, opts metav1.Upda
270270func (c * workloads ) Delete (ctx context.Context , obj runtime.Object , options metav1.DeleteOptions ) error {
271271 switch t := obj .(type ) {
272272 case * core.Pod :
273- return c .kc .CoreV1 ().Pods (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
273+ return c .kc .CoreV1 ().Pods (c .ns ).Delete (ctx , t .Name , options )
274274 // ReplicationController
275275 case * core.ReplicationController :
276- return c .kc .CoreV1 ().ReplicationControllers (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
276+ return c .kc .CoreV1 ().ReplicationControllers (c .ns ).Delete (ctx , t .Name , options )
277277 // Deployment
278278 case * extensions.Deployment :
279- return c .kc .ExtensionsV1beta1 ().Deployments (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
279+ return c .kc .ExtensionsV1beta1 ().Deployments (c .ns ).Delete (ctx , t .Name , options )
280280 case * appsv1beta1.Deployment :
281- return c .kc .AppsV1beta1 ().Deployments (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
281+ return c .kc .AppsV1beta1 ().Deployments (c .ns ).Delete (ctx , t .Name , options )
282282 case * appsv1beta2.Deployment :
283- return c .kc .AppsV1beta2 ().Deployments (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
283+ return c .kc .AppsV1beta2 ().Deployments (c .ns ).Delete (ctx , t .Name , options )
284284 case * appsv1.Deployment :
285- return c .kc .AppsV1 ().Deployments (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
285+ return c .kc .AppsV1 ().Deployments (c .ns ).Delete (ctx , t .Name , options )
286286 // DaemonSet
287287 case * extensions.DaemonSet :
288- return c .kc .ExtensionsV1beta1 ().DaemonSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
288+ return c .kc .ExtensionsV1beta1 ().DaemonSets (c .ns ).Delete (ctx , t .Name , options )
289289 case * appsv1beta2.DaemonSet :
290- return c .kc .AppsV1beta2 ().DaemonSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
290+ return c .kc .AppsV1beta2 ().DaemonSets (c .ns ).Delete (ctx , t .Name , options )
291291 case * appsv1.DaemonSet :
292- return c .kc .AppsV1 ().DaemonSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
292+ return c .kc .AppsV1 ().DaemonSets (c .ns ).Delete (ctx , t .Name , options )
293293 // ReplicaSet
294294 case * extensions.ReplicaSet :
295- return c .kc .ExtensionsV1beta1 ().ReplicaSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
295+ return c .kc .ExtensionsV1beta1 ().ReplicaSets (c .ns ).Delete (ctx , t .Name , options )
296296 case * appsv1beta2.ReplicaSet :
297- return c .kc .AppsV1beta2 ().ReplicaSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
297+ return c .kc .AppsV1beta2 ().ReplicaSets (c .ns ).Delete (ctx , t .Name , options )
298298 case * appsv1.ReplicaSet :
299- return c .kc .AppsV1 ().ReplicaSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
299+ return c .kc .AppsV1 ().ReplicaSets (c .ns ).Delete (ctx , t .Name , options )
300300 // StatefulSet
301301 case * appsv1beta1.StatefulSet :
302- return c .kc .AppsV1beta1 ().StatefulSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
302+ return c .kc .AppsV1beta1 ().StatefulSets (c .ns ).Delete (ctx , t .Name , options )
303303 case * appsv1beta2.StatefulSet :
304- return c .kc .AppsV1beta2 ().StatefulSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
304+ return c .kc .AppsV1beta2 ().StatefulSets (c .ns ).Delete (ctx , t .Name , options )
305305 case * appsv1.StatefulSet :
306- return c .kc .AppsV1 ().StatefulSets (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
306+ return c .kc .AppsV1 ().StatefulSets (c .ns ).Delete (ctx , t .Name , options )
307307 // Job
308308 case * batchv1.Job :
309- return c .kc .BatchV1 ().Jobs (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
309+ return c .kc .BatchV1 ().Jobs (c .ns ).Delete (ctx , t .Name , options )
310310 // CronJob
311311 case * batchv1beta1.CronJob :
312- return c .kc .BatchV1beta1 ().CronJobs (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
312+ return c .kc .BatchV1beta1 ().CronJobs (c .ns ).Delete (ctx , t .Name , options )
313313 case * ocapps.DeploymentConfig :
314- return c .oc .AppsV1 ().DeploymentConfigs (c .ns ).Delete (ctx , t .ObjectMeta . Name , options )
314+ return c .oc .AppsV1 ().DeploymentConfigs (c .ns ).Delete (ctx , t .Name , options )
315315 default :
316316 return fmt .Errorf ("the object is not a pod or does not have a pod template" )
317317 }
@@ -322,48 +322,48 @@ func (c *workloads) Get(ctx context.Context, obj runtime.Object, opts metav1.Get
322322 var err error
323323 switch t := obj .(type ) {
324324 case * core.Pod :
325- out , err = c .kc .CoreV1 ().Pods (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
325+ out , err = c .kc .CoreV1 ().Pods (c .ns ).Get (ctx , t .Name , opts )
326326 // ReplicationController
327327 case * core.ReplicationController :
328- out , err = c .kc .CoreV1 ().ReplicationControllers (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
328+ out , err = c .kc .CoreV1 ().ReplicationControllers (c .ns ).Get (ctx , t .Name , opts )
329329 // Deployment
330330 case * extensions.Deployment :
331- out , err = c .kc .ExtensionsV1beta1 ().Deployments (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
331+ out , err = c .kc .ExtensionsV1beta1 ().Deployments (c .ns ).Get (ctx , t .Name , opts )
332332 case * appsv1beta1.Deployment :
333- out , err = c .kc .AppsV1beta1 ().Deployments (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
333+ out , err = c .kc .AppsV1beta1 ().Deployments (c .ns ).Get (ctx , t .Name , opts )
334334 case * appsv1beta2.Deployment :
335- out , err = c .kc .AppsV1beta2 ().Deployments (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
335+ out , err = c .kc .AppsV1beta2 ().Deployments (c .ns ).Get (ctx , t .Name , opts )
336336 case * appsv1.Deployment :
337- out , err = c .kc .AppsV1 ().Deployments (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
337+ out , err = c .kc .AppsV1 ().Deployments (c .ns ).Get (ctx , t .Name , opts )
338338 // DaemonSet
339339 case * extensions.DaemonSet :
340- out , err = c .kc .ExtensionsV1beta1 ().DaemonSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
340+ out , err = c .kc .ExtensionsV1beta1 ().DaemonSets (c .ns ).Get (ctx , t .Name , opts )
341341 case * appsv1beta2.DaemonSet :
342- out , err = c .kc .AppsV1beta2 ().DaemonSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
342+ out , err = c .kc .AppsV1beta2 ().DaemonSets (c .ns ).Get (ctx , t .Name , opts )
343343 case * appsv1.DaemonSet :
344- out , err = c .kc .AppsV1 ().DaemonSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
344+ out , err = c .kc .AppsV1 ().DaemonSets (c .ns ).Get (ctx , t .Name , opts )
345345 // ReplicaSet
346346 case * extensions.ReplicaSet :
347- out , err = c .kc .ExtensionsV1beta1 ().ReplicaSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
347+ out , err = c .kc .ExtensionsV1beta1 ().ReplicaSets (c .ns ).Get (ctx , t .Name , opts )
348348 case * appsv1beta2.ReplicaSet :
349- out , err = c .kc .AppsV1beta2 ().ReplicaSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
349+ out , err = c .kc .AppsV1beta2 ().ReplicaSets (c .ns ).Get (ctx , t .Name , opts )
350350 case * appsv1.ReplicaSet :
351- out , err = c .kc .AppsV1 ().ReplicaSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
351+ out , err = c .kc .AppsV1 ().ReplicaSets (c .ns ).Get (ctx , t .Name , opts )
352352 // StatefulSet
353353 case * appsv1beta1.StatefulSet :
354- out , err = c .kc .AppsV1beta1 ().StatefulSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
354+ out , err = c .kc .AppsV1beta1 ().StatefulSets (c .ns ).Get (ctx , t .Name , opts )
355355 case * appsv1beta2.StatefulSet :
356- out , err = c .kc .AppsV1beta2 ().StatefulSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
356+ out , err = c .kc .AppsV1beta2 ().StatefulSets (c .ns ).Get (ctx , t .Name , opts )
357357 case * appsv1.StatefulSet :
358- out , err = c .kc .AppsV1 ().StatefulSets (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
358+ out , err = c .kc .AppsV1 ().StatefulSets (c .ns ).Get (ctx , t .Name , opts )
359359 // Job
360360 case * batchv1.Job :
361- out , err = c .kc .BatchV1 ().Jobs (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
361+ out , err = c .kc .BatchV1 ().Jobs (c .ns ).Get (ctx , t .Name , opts )
362362 // CronJob
363363 case * batchv1beta1.CronJob :
364- out , err = c .kc .BatchV1beta1 ().CronJobs (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
364+ out , err = c .kc .BatchV1beta1 ().CronJobs (c .ns ).Get (ctx , t .Name , opts )
365365 case * ocapps.DeploymentConfig :
366- out , err = c .oc .AppsV1 ().DeploymentConfigs (c .ns ).Get (ctx , t .ObjectMeta . Name , opts )
366+ out , err = c .oc .AppsV1 ().DeploymentConfigs (c .ns ).Get (ctx , t .Name , opts )
367367 default :
368368 err = fmt .Errorf ("the object is not a pod or does not have a pod template" )
369369 }
0 commit comments