@@ -411,9 +411,9 @@ func (t versionedTracker) Patch(gvr schema.GroupVersionResource, obj runtime.Obj
411411 return err
412412 }
413413
414- isStatus := bytes .Contains (debug .Stack (), []byte ("sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).statusPatch" ))
415414 // We apply patches using a client-go reaction that ends up calling the trackers Patch. As we can't change
416415 // 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" ))
417417
418418 obj , err = t .updateObject (gvr , obj , ns , isStatus , false , patchOptions .DryRun )
419419 if err != nil {
@@ -444,7 +444,7 @@ func (t versionedTracker) updateObject(gvr schema.GroupVersionResource, obj runt
444444 return nil , err
445445 }
446446
447- oldObject , err := t .Get (gvr , ns , accessor .GetName ())
447+ oldObject , err := t .ObjectTracker . Get (gvr , ns , accessor .GetName ())
448448 if err != nil {
449449 // If the resource is not found and the resource allows create on update, issue a
450450 // create instead.
@@ -515,7 +515,7 @@ func (t versionedTracker) updateObject(gvr schema.GroupVersionResource, obj runt
515515 }
516516
517517 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 })
519519 }
520520 return convertFromUnstructuredIfNecessary (t .scheme , obj )
521521}
0 commit comments