Skip to content

Helm Chart: make default resources empty so users can omit cpu request/limit #1788

@joelp172

Description

@joelp172

Description

The Helm chart currently sets default container resources (including CPU request/limit). This makes it impossible to configure only memory (or to "unset" CPU limits) via values overrides, because Helm values merging won't remove keys from the chart's default map.

Current behaviour [link]

Chart defaults include CPU, e.g.:

resources:
  requests:
    cpu: 500m
    memory: 256Mi
  limits:
    cpu: 500m
    memory: 256Mi

If a user tries to omit CPU by removing it from their override file, or setting cpu: "", Helm's merge results in CPU being retained from the chart defaults (or producing an invalid quantity).

Expected behavior

Chart should not force CPU requests/limits by default. Users should decide their own sizing.

Why this matters

Many clusters rely on defaults (or Vertical Pod Autoscaler, LimitRanges, etc.) and do not want to pin CPU limits for this workload.
With current defaults, you can't express "set memory but don't set cpu" using values alone.

Proposed change

Change chart values.yaml default from a populated map to an empty one:

resources: {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions