k0s icon indicating copy to clipboard operation
k0s copied to clipboard

Allow setting resources for kubernetes components via config

Open makhov opened this issue 4 years ago • 6 comments

Is your feature request related to a problem? Please describe. We don't set resources for kube-proxy, kube-router, metrics-server and also don't have a way to customize them with k0s config.

Describe the solution you'd like Add resources section to the k0s config and allow users to customize them if needed. Probably worth adding reasonable default values.

Additional context As a side-effect YAML linter returns some errors because of that

❌  Ensure each container has a configured memory request  [1 occurrence]
    — metadata.name: kube-proxy (kind: DaemonSet)
💡  Missing property object `requests.memory` - value should be within the accepted boundaries recommended by the organization

❌  Ensure each container has a configured CPU request  [1 occurrence]
    — metadata.name: kube-proxy (kind: DaemonSet)
💡  Missing property object `requests.cpu` - value should be within the accepted boundaries recommended by the organization

❌  Ensure each container has a configured memory limit  [1 occurrence]
    — metadata.name: kube-proxy (kind: DaemonSet)
💡  Missing property object `limits.memory` - value should be within the accepted boundaries recommended by the organization

❌  Ensure each container has a configured CPU limit  [1 occurrence]
    — metadata.name: kube-proxy (kind: DaemonSet)
💡  Missing property object `limits.cpu` - value should be within the accepted boundaries recommended by the organization

https://github.com/k0sproject/k0s/issues/1230

makhov avatar Dec 14 '21 15:12 makhov

The issue is marked as stale since no activity has been recorded in 30 days

github-actions[bot] avatar Jan 19 '22 23:01 github-actions[bot]

Any chance to get it implemented? I'd really love to set resource limits on k0s workloads.

fenio avatar Nov 24 '23 16:11 fenio

Is this going to be addressed? If not then can someone comment it with some rationale behind it not being covered?

fenio avatar Feb 06 '24 18:02 fenio

In case someone is using k0s with flux then here's a way I modify pushgateway resources: https://github.com/fenio/homelab/tree/main/cluster/apps/k0s-system It's possible to modify konnectivity-agent resources similar way.

fenio avatar Feb 17 '24 14:02 fenio

Mentioned konnectivity-agent: https://github.com/fenio/homelab/tree/main/cluster/apps/kube-system/konnectivity-agent

fenio avatar Feb 17 '24 18:02 fenio

Is this going to be addressed? If not then can someone comment it with some rationale behind it not being covered?

No deep rationale, just priorities have not aligned for any of the core team to have time to look at this. 😄

PR's are welcome in the mean time 😉

jnummelin avatar Feb 19 '24 11:02 jnummelin