@@ -386,6 +386,7 @@ func (w *typedWrapper) CreateOrUpdateIngress(controller client.Object, ingress *
386386func (w * typedWrapper ) Create (controller , obj client.Object ) error {
387387 return w .GenericControlInterface .Create (controller , obj , true )
388388}
389+
389390func (w * typedWrapper ) Exist (key client.ObjectKey , obj client.Object ) (bool , error ) {
390391 return w .GenericControlInterface .Exist (key , obj )
391392}
@@ -449,7 +450,6 @@ func (c *realGenericControlInterface) Exist(key client.ObjectKey, obj client.Obj
449450// call mergeFn to merge the change in new object to the existing object, then update the existing object.
450451// The object will also be adopted by the given controller.
451452func (c * realGenericControlInterface ) CreateOrUpdate (controller , obj client.Object , mergeFn MergeFn , setOwnerFlag bool ) (runtime.Object , error ) {
452-
453453 // controller-runtime/client will mutate the object pointer in-place,
454454 // to be consistent with other methods in our controller, we copy the object
455455 // to avoid the in-place mutation here and hereafter.
@@ -472,7 +472,7 @@ func (c *realGenericControlInterface) CreateOrUpdate(controller, obj client.Obje
472472 }
473473
474474 exist := err == nil
475- klog .Infof ("get obj %s/%s exist=%v" , obj .GetNamespace (), obj .GetName (), exist )
475+ klog .V ( 4 ). Infof ("get obj %s/%s exist=%v" , obj .GetNamespace (), obj .GetName (), exist )
476476 if exist {
477477 // 2. object has already existed, merge our desired changes to it
478478
@@ -607,6 +607,7 @@ func NewFakeGenericControl(initObjects ...runtime.Object) *FakeGenericControl {
607607 RequestTracker {},
608608 }
609609}
610+
610611func (c * FakeGenericControl ) Create (controller , obj client.Object , setOwnerFlag bool ) error {
611612 defer c .createTracker .Inc ()
612613 if c .createTracker .ErrorReady () {
@@ -630,9 +631,11 @@ func (c *FakeGenericControl) Exist(key client.ObjectKey, obj client.Object) (boo
630631func (c * FakeGenericControl ) SetCreateError (err error , after int ) {
631632 c .createTracker .SetError (err ).SetAfter (after )
632633}
634+
633635func (c * FakeGenericControl ) SetExistError (err error , after int ) {
634636 c .existTracker .SetError (err ).SetAfter (after )
635637}
638+
636639func (c * FakeGenericControl ) SetUpdateStatusError (err error , after int ) {
637640 c .updateStatusTracker .SetError (err ).SetAfter (after )
638641}
0 commit comments