redpanda-data / helm-charts

Redpanda Helm Chart
http://redpanda.com
Apache License 2.0
75 stars 96 forks source link

CPU requests aren't set on redpanda statefulset unless min memory is specified. #1494

Open supernomad opened 1 month ago

supernomad commented 1 month ago

What happened?

We expected to have CPU requests set for all pods, however we are not setting a minimum amount of memory in the helm chart. This results in a statefulset with CPU limits but no requests.

What did you expect to happen?

We expected the statefulset to have both requests/limits for at least CPU since it was specified in the values file.

How can we reproduce it (as minimally and precisely as possible)?. Please include values file.

Deploy the helm chart without a minimum memory limit specified, and observe the statefulset lacking a CPU requests configuration.

Anything else we need to know?

We took a peak at the code and it seems like a small bug here: https://github.com/redpanda-data/helm-charts/blob/main/charts/redpanda/statefulset.go#L762-L772 where the requests are only set if the minimum memory value is specified.

Which are the affected charts?

Redpanda

Chart Version(s)

5.8.12

Cloud provider

GCP

JIRA Link: K8S-325