Title: fix: Harden informer cache with label selectors and memory optimizations by jyejare · Pull Request #6242 · feast-dev/feast · GitHub
Open Graph Title: fix: Harden informer cache with label selectors and memory optimizations by jyejare · Pull Request #6242 · feast-dev/feast
X Title: fix: Harden informer cache with label selectors and memory optimizations by jyejare · Pull Request #6242 · feast-dev/feast
Description: 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 ByObject label selectors for all owned resource types Restrict 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 into newCacheOptions() for clarity. DefaultTransform: cache.TransformStripManagedFields() Strip managedFields from all cached objects, reducing per-object memory footprint by ~30-50%. GOMEMLIMIT=230MiB Set Go runtime soft memory limit (90% of 256Mi container limit). Triggers GC pressure before hard OOMKill as defense-in-depth. Additional changes Add app.kubernetes.io/managed-by: feast-operator label to getLabels() so all FeatureStore-managed resources carry it Introduce getSelectorLabels() for immutable selectors (Deployment spec.selector, Service spec.selector, TopologySpreadConstraints, PodAffinity) to avoid breaking existing resources on upgrade Standardize notebook controller's managed-by label to app.kubernetes.io/managed-by Use shared constants (services.ManagedByLabelKey/Value) throughout Test Results Verified on cluster with a large number of ConfigMaps pre-loaded: Metric Before After Memory usage 254Mi (at limit) 25Mi Stability OOMKilled, CrashLoopBackOff Stable, no restarts Test plan Deploy fixed operator on RHOAI 3.3.0 cluster Verify memory usage stays well below 256Mi limit under load Verify no OOMKill or CrashLoopBackOff Run existing unit tests (make test) — all pass Verify getSelectorLabels() prevents immutable selector breakage on upgrade Summary by CodeRabbit Chores Operator cache now only watches/caches resources marked with the managed-by label, reducing resource usage. Added GOMEMLIMIT=230MiB to the controller-manager container. Standardized managed-by label constants and separated immutable selector labels from mutable metadata to improve stability. Tests Updated tests to use the shared label constants.
Open Graph Description: 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 in...
X Description: 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, th...
Opengraph URL: https://github.com/feast-dev/feast/pull/6242
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ba104339-a57b-1283-740f-77b7f1a72280 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E15C:B577:F20C5F:14C3D58:6A4DD545 |
| html-safe-nonce | 665ce8f7f23f9a8a8fbc132971c1e67e4fe81c7a77da7b7c8e0ed5e65ab9ba1c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTVDOkI1Nzc6RjIwQzVGOjE0QzNENTg6NkE0REQ1NDUiLCJ2aXNpdG9yX2lkIjoiNzI3MjkxNTA0MTc3MDEzMjgwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 826978c44bd5f8fa877f5479d69c149fad9c84794c6ebf6d3edf8b50ab097b4d |
| hovercard-subject-tag | pull_request:3504437376 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6242/files |
| twitter:image | https://avatars.githubusercontent.com/u/11752425?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11752425?s=400&v=4 |
| og:image:alt | 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 in... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width