Skip to content

Cannot set namespace of informers created by informer factory #9

Closed
kubernetes/kubernetes
#54660
@chancez

Description

@chancez

Currently the generated code outputs an interface like this:

// Interface provides access to all the informers in this group version.
type Interface interface {
	// Foos returns a FooInformer.
	Foos() FooInformer
	// Bars returns a BarInformer.
	Bars() BarInformer
	// FooBars returns a FooBarInformer.
	FooBars() FooBarInformer
}

These informers return an interface like this:

type FooInformer interface {
	Informer() cache.SharedIndexInformer
	Lister() v1alpha1.FooLister
}

However there is no way to specify you want an informer restricted to a particular namespace. The only alternative seems to be to use the method NewFooInformer constructor, but then I'm creating all my Informers and Listers myself.

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