Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
feat: Dont set defaults for resource limits
Browse files Browse the repository at this point in the history
Setting a default value isn't ideal. Causes unsuspecting OOM, high latencies due to CPU throttling etc.
  • Loading branch information
mr-karan authored Nov 27, 2020
1 parent 0da6f2b commit 29a01f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/containers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
{{- end}}
resources:
requests:
memory: {{- if .RequestsMemory }} {{.RequestsMemory}} {{- else }} 128Mi {{- end}}
cpu: {{- if .RequestsCPU }} {{.RequestsCPU}} {{- else }} 250m {{- end}}
memory: {{- if .RequestsMemory }} {{.RequestsMemory}}
cpu: {{- if .RequestsCPU }} {{.RequestsCPU}}
limits:
memory: {{- if .LimitsMemory }} {{.LimitsMemory}} {{- else }} 256Mi {{- end}}
cpu: {{- if .LimitsCPU }} {{.LimitsCPU}} {{- else }} 500m {{- end}}
memory: {{- if .LimitsMemory }} {{.LimitsMemory}}
cpu: {{- if .LimitsCPU }} {{.LimitsCPU}}
{{- if .ReadinessProbePort}}
readinessProbe:
httpGet:
Expand Down

0 comments on commit 29a01f2

Please sign in to comment.