{{ message }}
fix: Harden informer cache with label selectors and memory optimizations#6242
Merged
ntkathole merged 2 commits intoApr 13, 2026
Merged
fix: Harden informer cache with label selectors and memory optimizations#6242ntkathole merged 2 commits into
ntkathole merged 2 commits into
Conversation
eab7bf4 to
aa69c5b
Compare
April 8, 2026 18:34
aa69c5b to
6a2995e
Compare
April 9, 2026 08:57
b3237d2 to
e1b57ef
Compare
April 10, 2026 11:10
Signed-off-by: Jitendra Yejare <11752425+jyejare@users.noreply.github.com>
Signed-off-by: Jitendra Yejare <11752425+jyejare@users.noreply.github.com>
e1b57ef to
91a3f79
Compare
April 13, 2026 11:36
ntkathole
approved these changes
Apr 13, 2026
ntkathole
left a comment
Member
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Hide details
View details
ntkathole
merged commit
3f11356
into
feast-dev:master
Apr 13, 2026
32 of 35 checks passed
korbonits
pushed a commit
to korbonits/feast
that referenced
this pull request
Apr 13, 2026
…ons (feast-dev#6242) * fix: Harden informer cache with label selectors and memory optimizations Signed-off-by: Jitendra Yejare <11752425+jyejare@users.noreply.github.com> * Additional Fixes on caching with PVC and HPA Signed-off-by: Jitendra Yejare <11752425+jyejare@users.noreply.github.com> --------- Signed-off-by: Jitendra Yejare <11752425+jyejare@users.noreply.github.com> Signed-off-by: Alex Korbonits <alex@korbonits.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.
Summary
The feast-operator's
Owns()calls create cluster-wide informers for ConfigMaps, Deployments, Services, and other resource types. On clusters with a large number of these objects, the informer cache can grow beyond the operator's 256Mi memory limit, causing OOMKill and restarts.Changes
ByObjectlabel selectors for all owned resource typesRestrict informer caches to only objects with
app.kubernetes.io/managed-by: feast-operator. Covers all 10 owned types: ConfigMap, Deployment, Service, ServiceAccount, PVC, RoleBinding, Role, CronJob, HPA, PDB. Extracted intonewCacheOptions()for clarity.DefaultTransform: cache.TransformStripManagedFields()Strip
managedFieldsfrom all cached objects, reducing per-object memory footprint by ~30-50%.GOMEMLIMIT=230MiBSet Go runtime soft memory limit (90% of 256Mi container limit). Triggers GC pressure before hard OOMKill as defense-in-depth.
Additional changes
app.kubernetes.io/managed-by: feast-operatorlabel togetLabels()so all FeatureStore-managed resources carry itgetSelectorLabels()for immutable selectors (Deploymentspec.selector, Servicespec.selector, TopologySpreadConstraints, PodAffinity) to avoid breaking existing resources on upgradeapp.kubernetes.io/managed-byservices.ManagedByLabelKey/Value) throughoutTest Results
Verified on cluster with a large number of ConfigMaps pre-loaded:
Test plan
make test) — all passgetSelectorLabels()prevents immutable selector breakage on upgradeSummary by CodeRabbit