Skip to content

SharedInformerFactory.inNamespace() deprecated without an equivalent alternative #7322

@adriansuarez

Description

@adriansuarez

Is your enhancement related to a problem? Please describe

The Javadoc for SharedInformerFactory.inNamespace() says to use the Informable interface. But shared informers created through the Informable interface are not accessible using SharedInformerFactory.getExistingSharedInformer().

I'm not sure why namespace-scoped shared informers should not be managed by the SharedInformerFactory.

Anyone who is creating namespace-scoped informers using the SharedInformerFactory and is relying on the factory as a registry for shared informers will have to create their own registry and manage the lifecycle of the shared informer themselves. That is more work than just changing the method that is being invoked.

Describe the solution you'd like

Remove the @Deprecated annotation from SharedInformerFactory.inNamespace(). I'm assuming that the @Deprecated annotation means that the method will be removed in a future release, but I don't think it should be removed for the reason above.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions