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

Set resource requests for forklift-operator #765

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

ahadas
Copy link
Member

@ahadas ahadas commented Feb 22, 2024

The forklift-operator pod is not CPU intensive, so minimal CPU time should be sufficient. When it comes to memory, in some environments it consumes ~40Mi and in others ~100Mi, so asking for 64Mi seems reasonable.

see this

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
7.8% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.94%. Comparing base (f10fd99) to head (c9059b5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #765      +/-   ##
==========================================
- Coverage   15.98%   15.94%   -0.05%     
==========================================
  Files         106      106              
  Lines       19714    19714              
==========================================
- Hits         3152     3143       -9     
- Misses      16284    16295      +11     
+ Partials      278      276       -2     
Flag Coverage Δ
unittests 15.94% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@liranr23
Copy link
Member

I'm uncertain how we should know what is the memory and CPU resources that would fit the "golden zone"(more than minimal, but not exhausting them). we can start with your PR and see if a problem appear?

The forklift-operator pod is not CPU intensive, so minimal CPU time
should be sufficient. When it comes to memory, in some environments it
consumes ~40Mi and in others ~100Mi, so asking for 64Mi seems
reasonable.

Signed-off-by: Arik Hadas <[email protected]>
@ahadas ahadas force-pushed the operator_resource_requests branch from 5a96f7a to c9059b5 Compare June 5, 2024 09:17
Copy link

sonarqubecloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ahadas
Copy link
Member Author

ahadas commented Jun 5, 2024

I'm uncertain how we should know what is the memory and CPU resources that would fit the "golden zone"(more than minimal, but not exhausting them). we can start with your PR and see if a problem appear?

it's unlikely that we'll see a problem because currently we don't set a request for memory so the memory consumption of the operator pod is not taken into consideration when scheduling the pod and it may end up running on a node that doesn't have enough memory available. so if the pod tries to allocate more than 64Mi and there's not enough memory available - we're at the same situation. and 64Mi is more or less what the pod takes, so we don't reserve significantly more than it needs.

and as for CPU, the operator pod is not CPU intensive - asking for 10% of what the main container in the forklift-controller pod asks for sounds reasonable

updated the commit message to have this documented

@ahadas ahadas merged commit 0f2879f into kubev2v:main Jun 5, 2024
11 of 12 checks passed
@ahadas ahadas deleted the operator_resource_requests branch June 5, 2024 10:49
@ahadas ahadas added this to the 2.6.3 milestone Jun 5, 2024
@ahadas ahadas removed this from the 2.6.3 milestone Jun 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants