Skip to content

informers for multiple namespaces #3367

@YoniRomm

Description

@YoniRomm

currently the informers are only cluster wide or namespace specific.

I want to have an option like in controller-runtime to watch specific namespaces.

wide cluster access to secrets for example is problematic because of security concerns

I want it for the kafka-controller specifically but this is a general issue.

I already forked the kafka controller and override the default secret informer from this pacakge, so maybe this is something you would consider adding here.

what i basicly do is:

	subs := make([]informers.SharedInformerFactory, 0, len(namespaces))
	for _, ns := range namespaces {
		subs = append(subs, informers.NewSharedInformerFactoryWithOptions(
			client, resync, informers.WithNamespace(ns),
		))
	}

and then only for secrets create some wrap informer which maps the namespace to the dedicated namespaced informer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions