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

Clarification around ByObject cache filtering, when cache stopped for other resources after setting for one #3025

Open
MuneebAijaz opened this issue Nov 27, 2024 · 0 comments

Comments

@MuneebAijaz
Copy link

i am fine-tuning cache for some of the controllers, but i am observing that the reconciler stops running for other resources after i set it.

	customCache = cache.Options{
		ByObject: map[runtimeclient.Object]cache.ByObject{
			&corev1.ConfigMap{}: {
				Namespaces: map[string]cache.Config{
					watchedNamespace: {},
				},
			},
		},
	}

this is what i am using for controller to only watch CMs in operator ns only. but when i use this customCache, other resources stop getting events. i can see them in logs put in predicates inside SetupWithManager. but after returning true from update/delete/create events, reconcile doesn't start for custom resource.

my assumption here was it'd only affect configmap, but others will still work like before, by caching all objects.

any idea what's happening, or if i am using this function wrongly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant