Support removal of event handlers from SharedIndexInformers

136 views
Skip to first unread message

Krueger, Uwe

unread,
Feb 4, 2021, 11:18:05 AM2/4/21
to kubernetes-sig...@googlegroups.com

Hi,

 

pull request https://github.com/kubernetes/kubernetes/pull/98657 for the cache package in client-go introduces

the possibility to remove formerly added handlers again from the standard shared index informers.

 

I haven’t extended the standard SharedIndexInformer interface in this PR and added an additional

ExtendedSharedIndexInformer interface instead, because I don’t want to break other potential implementations.

 

@yliaog would prefer to extend the existing interface, although this would be a breaking change, and proposed
to decide on this in the sig-api-machinery group.

 

Thanks

Uwe

Daniel Smith

unread,
Feb 4, 2021, 11:43:30 AM2/4/21
to Krueger, Uwe, kubernetes-sig...@googlegroups.com
I think I agree with @yliaog, it's not a very severe form of breakage to add a method to the interface, I don't expect many people to be implementing that interface. I put it on the agenda but we can take it off again if responses here on the list are heavily on one side or the other of the question :)

(And note that you can implement an interface in a safe way (for the most common case where you want to do a special thing on a method or two) by embedding an underlying object of that interface type)

--
You received this message because you are subscribed to the Google Groups "K8s API Machinery SIG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-api-m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-api-machinery/AM0PR0202MB3378ECDC07719F25C6F364A7E7B39%40AM0PR0202MB3378.eurprd02.prod.outlook.com.

David Eads

unread,
Feb 4, 2021, 3:58:10 PM2/4/21
to Daniel Smith, Krueger, Uwe, kubernetes-sig...@googlegroups.com
I think updating the existing interface is a good idea.

Daniel Smith

unread,
Feb 4, 2021, 4:03:09 PM2/4/21
to David Eads, Krueger, Uwe, kubernetes-sig...@googlegroups.com
OK let's give it a ~day for any objectors and then call it decided.
Reply all
Reply to author
Forward
0 new messages