pega-helm-charts
pega-helm-charts copied to clipboard
Allow setting CPU Limit to Null
Describe the bug The chart establishes default values for tiers when the chart variable is unspecified, thereby preventing us from inadvertently . When explicitly setting the cpuLimit to ~ the Chart overwrites it with 4.
This is cause by
{{- if .node.cpuLimit }}
cpu: "{{ .node.cpuLimit }}"
{{- else }}
cpu: 4
{{- end }}
To Reproduce
- Set cpuLimit of any Tier to ~
- Execute Helm Template
- Observe CPU Limit set for the tier
Expected behavior cpuLimit is not defined
Chart version
- No Customizations
- Chart Version: 3.17
Server (if applicable, please complete the following information):
- Environment: OpenShift
Additional context Add any other context about the problem here.
Solution Only set defaults in values.yaml as recommended as a best practice by helm
@micgoe I would like to understand your use case for not specifying the CPU limits for the deployment as keeping CPU limits open may consume all the resources on the node. I understand specifying limits is a hard stop for your deployment and get into insufficient resources but letting the deployment use the whole resources might also affect the other pods. Both have there pros and cons, but I would like to understand your requirement.
Sure thing. Thank you for taking on this issue @MadhuriArugula. In general on all our workload we set 3 things: CPU Request, Memory Request, Memory Limits. That way, every pod has its guaranteed amount of CPU as specified in their respective CPU Request. However, every pod can consume as much CPU as available in the cluster. As an example: Pod A has a peak in CPU need, thus using all the CPU available on the node. Now we deploy another pod (Pod B) with its respective CPU Request. Pod B now gets its guaranteed amount of CPU and Pod-A will be throttled by a bit and can only consume the CPU Available Prior - Pod-A CPU Request.
This article explains it quite well actually https://home.robusta.dev/blog/stop-using-cpu-limits
US-612658 (internal)