@@ -274,6 +274,12 @@ func NewPodController(cfg PodControllerConfig) (*PodController, error) {
274274 return nil , pkgerrors .Wrap (err , "could not create resource manager" )
275275 }
276276
277+ // Under the hood, we expect the provider to implement PodUIDLifecycleHandler.
278+ // However, PodControllerConfig accepts PodLifecycleHandler, which might not
279+ // implement this. For backwards compatibility, we haven't changed the type
280+ // in PodControllerConfig, but if the provider doesn't implement PodUIDLifecycleHandler
281+ // we wrap it in uidProviderWrapper. In the future, we will require asyncProvider
282+ // to be implemented directly (PodUIDLifecycleHandler + PodNotifier).
277283 var provider PodUIDLifecycleHandler
278284 if p , ok := cfg .Provider .(PodUIDLifecycleHandler ); ok {
279285 provider = p
@@ -329,6 +335,12 @@ func (pc *PodController) Run(ctx context.Context, podSyncWorkers int) (retErr er
329335 var provider asyncProvider
330336 runProvider := func (context.Context ) {}
331337
338+ // Under the hood, we expect the provider to implement PodNotifier.
339+ // However, PodControllerConfig accepts PodLifecycleHandler, which might not
340+ // implement this. For backwards compatibility, we haven't changed the type
341+ // in PodControllerConfig, but if the provider doesn't implement PodNotifier
342+ // we wrap it in syncProviderWrapper. In the future, we will require asyncProvider
343+ // to be implemented directly (PodUIDLifecycleHandler + PodNotifier).
332344 if p , ok := pc .provider .(asyncProvider ); ok {
333345 provider = p
334346 } else {
0 commit comments