2

I have a question regarding the difference between NewIndexerInformer and NewSharedIndexInformer as I would like to use NewSharedIndexInformer instead NewIndexerInformer

https://github.com/kubernetes/client-go/blob/master/tools/cache/shared_informer.go#L132 and

https://github.com/kubernetes/client-go/blob/master/tools/cache/controller.go#L307

in NewIndexerInformer I pass the ResourceEventHandler but in NewSharedIndexInformer I cannot, this means I don't need to specify events of creation, deletion, etc?

I am doing the following https://pastebin.com/kqvQpDLU in line 226 and 251

Thanks in advance

  • SharedInformers share the connection with the API server and other resources between your informers. According to this: https://stackoverflow.com/questions/59544139/kubernetes-client-go-watch-interface-vs-cache-newinformer-vs-cache-newsharedi – 425nesp Sep 10 '20 at 21:30

0 Answers0