Repository navigation
Reduce tiny profile resource overhead #347
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -370,6 +370,39 @@ func getCentralResourcesOperator(resourcesProfile types.ResourceProfile) map[str | |
| }, | ||
| }, | ||
| }, | ||
| "centralWorker": map[string]any{ | ||
| "resources": map[string]any{ | ||
| "requests": map[string]any{"cpu": "10m", "memory": "128Mi"}, | ||
| "limits": map[string]any{"memory": "128Mi"}, | ||
| }, | ||
| }, | ||
| // Only replace args: retain the image entrypoint and standard config file. | ||
| // Optional because external-DB deployments have no central-db Deployment. | ||
| "overlays": []any{ | ||
| map[string]any{ | ||
| "apiVersion": "apps/v1", | ||
| "kind": "Deployment", | ||
| "name": "central-db", | ||
| "optional": true, | ||
| "patches": []any{ | ||
| map[string]any{ | ||
| "path": "spec.template.spec.containers[name:central-db].args", | ||
| "value": `- postgres | ||
| - -c | ||
| - config_file=/etc/stackrox.d/config/postgresql.conf | ||
| - -c | ||
| - shared_buffers=128MB | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve PostgreSQL settings supplied through If a tiny-profile deployment uses When building the Central CR, omit this tuning overlay if the user supplies
|
||
| - -c | ||
| - work_mem=4MB | ||
| - -c | ||
| - maintenance_work_mem=64MB | ||
| - -c | ||
| - autovacuum_work_mem=32MB | ||
| `, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| "scanner": map[string]interface{}{ | ||
| "scannerComponent": "Disabled", | ||
| }, | ||
|
|
@@ -906,7 +939,13 @@ func getSecuredClusterResourcesOperator(resourceProfile types.ResourceProfile) m | |
| return map[string]interface{}{ | ||
| "spec": map[string]interface{}{ | ||
| "admissionControl": map[string]interface{}{ | ||
| "replicas": 1, | ||
| "replicas": 1, | ||
| "resources": map[string]any{"requests": map[string]any{"cpu": "10m"}}, | ||
| }, | ||
| "perNode": map[string]any{ | ||
| "collector": map[string]any{"resources": map[string]any{"requests": map[string]any{"cpu": "10m"}}}, | ||
| "compliance": map[string]any{"resources": map[string]any{"requests": map[string]any{"cpu": "10m"}}}, | ||
| "nodeInventory": map[string]any{"resources": map[string]any{"requests": map[string]any{"cpu": "10m"}}}, | ||
| }, | ||
| "sensor": map[string]interface{}{ | ||
| "resources": securedClusterSensorResourcesTiny, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are also adding
limits, below there are resources for which we only setrequests. I guess my general question is, why are we even caring about modifyinglimitshere, wouldn't 'requests' be entirely sufficient for a resource profile?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's should not be here. I'm thinking about CI and we should keep requests == limits to ensure our runs are repetitable and stable and caught accidental OOMs fast. Maybe we could have
--strict-memflag that sets limits to requests.