📖predicate: clarify predicates don't reduce cache memory - #3562
Conversation
|
|
|
Welcome @GellertBabel! |
|
Hi @GellertBabel. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
3c9e868 to
e879bd2
Compare
|
|
||
| // Predicate filters events before enqueuing the keys. | ||
| // | ||
| // NOTE: Predicates only filter which events are enqueued for reconciliation. |
There was a problem hiding this comment.
This first sentence just repeats the info two lines above. Please just say "This setting doesn't impact what the cache stores, use cache.Options to configure that. Keep in mind that cache.Options are global to all users of the cache." or some such.
Please do not mention individual cache option names here, they could change and are already documented in cache.Options. Suggesting to use cache.Disable for is also pretty nonsensical, you never want to disable the cache for an object you have a source configured for.
Signed-off-by: Gellért Bábel <gellert.babel@ericsson.com>
e879bd2 to
5062d6c
Compare
|
LGTM label has been added. DetailsGit tree hash: 7cef5423a6c6e3a518f5c2a77668889a8401738c |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, GellertBabel The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Clarifies in the
Predicategodoc that predicates only filter which events are enqueued for reconciliation — they do not reduce what the informer cache stores. Every watched object is still held in memory regardless of whether a predicate rejects its events.Adds a short pointer to the mechanisms that actually bound cache memory for a Kind: a label/field selector (
cache.Options/cache.ByObject), acache.ByObjectTransform, orclient.Options.Cache.DisableFor.This is a source of confusion (and OOMKills) for controllers watching Kinds with many or large objects, e.g. Secrets in a namespace that also holds large, unrelated objects.
Fixes #3552