Summary
There is currently no supported way to deploy the DaemonSet without a CPU
limit. CPU limits cause CFS throttling that degrades performance even when CPU
is available, so many operators prefer to set CPU/memory requests but omit the
CPU limit entirely. The chart does not allow this.
Current behavior
templates/daemonset.yaml renders the limit unconditionally:
resources:
requests:
memory: {{ .Values.image.request_mem }}
cpu: {{ .Values.image.request_cpu }}
limits:
memory: {{ .Values.image.limit_mem }}
cpu: {{ .Values.image.limit_cpu }}
and values.schema.json requires image.limit_cpu to be a present string.
This leaves no way to omit the CPU limit:
-
image.limit_cpu: "" renders cpu: "", which Kubernetes interprets as a
limit of 0. The DaemonSet is then rejected because the request exceeds it:
DaemonSet.apps "core-dump-handler" is invalid:
spec.template.spec.containers[0].resources.requests:
Invalid value: "250m": must be less than or equal to cpu limit of 0
-
image.limit_cpu: null (or omitting it) fails schema validation:
values don't meet the specifications of the schema(s) ...
- at '/image': missing property 'limit_cpu'
Verified against chart v9.0.0 and the current template on main.
Requested change
Allow each resource field to be omitted when unset, e.g. wrap the limit lines in
a conditional:
{{- if or .Values.image.limit_mem .Values.image.limit_cpu }}
limits:
{{- with .Values.image.limit_mem }}
memory: {{ . }}
{{- end }}
{{- with .Values.image.limit_cpu }}
cpu: {{ . }}
{{- end }}
{{- end }}
and relax values.schema.json so limit_cpu (and ideally the other resource
fields) may be null/absent. A common alternative is to expose a single
resources: map rendered with {{- toYaml .Values.resources | nindent }}, which
lets operators specify exactly the requests/limits they want.
This would let users follow the widely recommended practice of setting CPU
requests without a CPU limit.
Summary
There is currently no supported way to deploy the DaemonSet without a CPU
limit. CPU limits cause CFS throttling that degrades performance even when CPU
is available, so many operators prefer to set CPU/memory requests but omit the
CPU limit entirely. The chart does not allow this.
Current behavior
templates/daemonset.yamlrenders the limit unconditionally:and
values.schema.jsonrequiresimage.limit_cputo be a presentstring.This leaves no way to omit the CPU limit:
image.limit_cpu: ""renderscpu: "", which Kubernetes interprets as alimit of
0. The DaemonSet is then rejected because the request exceeds it:image.limit_cpu: null(or omitting it) fails schema validation:Verified against chart
v9.0.0and the current template onmain.Requested change
Allow each resource field to be omitted when unset, e.g. wrap the limit lines in
a conditional:
and relax
values.schema.jsonsolimit_cpu(and ideally the other resourcefields) may be
null/absent. A common alternative is to expose a singleresources:map rendered with{{- toYaml .Values.resources | nindent }}, whichlets operators specify exactly the requests/limits they want.
This would let users follow the widely recommended practice of setting CPU
requests without a CPU limit.