Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiNamespacedCacheBuilder is deprecated and can't be used to define the operator scope #6715

Closed
snorwin opened this issue Apr 3, 2024 · 1 comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.

Comments

@snorwin
Copy link

snorwin commented Apr 3, 2024

What is the URL of the document?

https://sdk.operatorframework.io/docs/building-operators/golang/operator-scope/#watching-resources-in-a-set-of-namespaces

Which section(s) is the issue in?

Watching resources in a set of Namespaces

What needs fixing?

MultiNamespacedCacheBuilder is deprecated and removed since controller-runtiime v0.16.0 . It would be great if the example is updated using cache.Options.Namespace instead.

NewCache: func(config *rest.Config, opts cache.Options) (cache.Cache, error) {
	opts.DefaultNamespaces = map[string]cache.Config{
		"my-ns": cache.Config{},
	}
	return cache.New(config, opts)
},

Additional context

https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.3/pkg/cache#MultiNamespacedCacheBuilder

@snorwin snorwin added the kind/documentation Categorizes issue or PR as related to documentation. label Apr 3, 2024
@snorwin
Copy link
Author

snorwin commented Apr 15, 2024

#6719

@snorwin snorwin closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

No branches or pull requests

1 participant