node-feature-discovery
node-feature-discovery copied to clipboard
Specify resource limits (and requests) in NFD deployment files
What would you like to be added:
Refs #1614
We should specify resource requests (cpu and memory requests and limits) in the NFD deployment files. I.e. both kustomize and Helm chart.
Why is this needed:
Best practices.
We have https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/helm/node-feature-discovery/values.yaml#L96
Commented and with a low request/limit. moving forward should be the opposite, it should be uncommented and users can comment out if they feel to.
Numbers should be
limits:
cpu: 300m
memory: 1G
requests:
cpu: 100m
memory: 128Mi
/assign
We have https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/helm/node-feature-discovery/values.yaml#L96
Commented and with a low request/limit. moving forward should be the opposite, it should be uncommented and users can comment out if they feel to.
Numbers should be
limits: cpu: 300m memory: 1G requests: cpu: 100m memory: 128Mi
Given that memory cannot be returned back to the pool once assigned, setting limits.memory and requests.memory to the same value will work better. In this case, 1Gi.
For CPU, it worth taking into consideration that setting a limit might cause throttling. If that's undesirable, then leaving limits.cpu unset is the way to go. Otherwise, it's fine.