FlowFuse / FlowFuse/driver-k8s
Allow CPU request and limit to be configured separately
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 3
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 10
Description
### Description
The driver sets CPU request == limit from the Stack's `cpu` value:
```
requests.cpu = `${stack.cpu * 10}m`
limits.cpu = `${stack.cpu * 10}m`
```
For Hosted Instances, it is not unusual to be mostly idle with occasional bursts, so the scheduler reserves
peak CPU permanently.
Lowering the Stack `cpu` doesn't help - it drops the limit too, removing burst headroom.
Expected yaml snippet for a Hosted Instance deployment:
```yaml
requests:
cpu: 100m
limits:
cpu: 500m
```
Options:
* an optional `cpuRequest` on the Stack
* a request/limit ratio configuration
* soft/hard CPU limits (soft = requests ; hard = limits)
Should default to current behaviour when unset.
The memory constraint already has separate values; worth deciding if it needs the same treatment.
Once this is implemented, it requires UI changes related to Stacks configuration/presentation.
### Requested By
https://app-eu1.hubspot.com/help-desk/26586079/view/233410279/ticket/431216074986/thread/21419673842
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the driver logic that currently assigns the Stack cpu value to both requests.cpu and limits.cpu. Review the Stack configuration and presentation UI changes required for the chosen configuration approach. Done means request and limit can be configured separately while unset values preserve the current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100