@@ -411,9 +411,9 @@ func (t versionedTracker) Patch(gvr schema.GroupVersionResource, obj runtime.Obj
411
411
return err
412
412
}
413
413
414
- isStatus := bytes .Contains (debug .Stack (), []byte ("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).statusPatch" ))
415
414
// We apply patches using a client-go reaction that ends up calling the trackers Patch. As we can't change
416
415
// that reaction, we use the callstack to figure out if this originated from the status client.
416
+ isStatus := bytes .Contains (debug .Stack (), []byte ("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).statusPatch" ))
417
417
418
418
obj , err = t .updateObject (gvr , obj , ns , isStatus , false , patchOptions .DryRun )
419
419
if err != nil {
@@ -444,7 +444,7 @@ func (t versionedTracker) updateObject(gvr schema.GroupVersionResource, obj runt
444
444
return nil , err
445
445
}
446
446
447
- oldObject , err := t .Get (gvr , ns , accessor .GetName ())
447
+ oldObject , err := t .ObjectTracker . Get (gvr , ns , accessor .GetName ())
448
448
if err != nil {
449
449
// If the resource is not found and the resource allows create on update, issue a
450
450
// create instead.
@@ -515,7 +515,7 @@ func (t versionedTracker) updateObject(gvr schema.GroupVersionResource, obj runt
515
515
}
516
516
517
517
if ! accessor .GetDeletionTimestamp ().IsZero () && len (accessor .GetFinalizers ()) == 0 {
518
- return nil , t .Delete (gvr , accessor .GetNamespace (), accessor .GetName (), metav1.DeleteOptions {DryRun : dryRun })
518
+ return nil , t .ObjectTracker . Delete (gvr , accessor .GetNamespace (), accessor .GetName (), metav1.DeleteOptions {DryRun : dryRun })
519
519
}
520
520
return convertFromUnstructuredIfNecessary (t .scheme , obj )
521
521
}
0 commit comments