-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add an option which enables the memory optimization inside of spod daemon #1425
Add an option which enables the memory optimization inside of spod daemon #1425
Conversation
…ly the pods labeled for recording
… for spod controller
/assign @saschagrunert |
/test all |
1 similar comment
/test all |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1425 +/- ##
==========================================
- Coverage 44.17% 44.13% -0.04%
==========================================
Files 50 50
Lines 5646 5651 +5
==========================================
Hits 2494 2494
- Misses 3032 3037 +5
Partials 120 120 |
very nice! It looks good to me. I'll merge this once CI passes. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ccojocar, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thank you! |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Adds an option to enable memory optimization inside of spod daemon.
The controller running inside of spod daemon process is watching all pods available in the cluster when profile recording
is enabled. It will perform some pre-filtering before the reconciliation to select only the pods running on local
node as well as pods annotated for recording, but this operation takes place after all pods objects are loaded
into the cache memory of the informer. This can lead to very high memory usage in large clusters with 1000s of pods, resulting in spod daemon running out of memory or crashing.
In order to prevent this situation, the spod daemon can be configured to only load into the cache memory the pods explicitly
labeled for profile recording.
Which issue(s) this PR fixes:
Fixes #1385
Fixes #1386
Does this PR have test?
yes
Special notes for your reviewer:
Does this PR introduce a user-facing change?