bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.6k stars 8.98k forks source link

[bitnami/thanos] Set enable-auto-gomemlimit when memory requests/limits are set #25555

Closed rouke-broersma closed 1 month ago

rouke-broersma commented 1 month ago

Name and Version

bitnami/thanos

What is the problem this feature will solve?

Thanos 0.35.0 introduced the flag enable-auto-gomemlimit which automatically sets the go memory limit to 90% of container memory. This is not enabled by default in thanos because thanos possibly runs on systems that share resources.

What is the feature you are proposing to solve the problem?

This helm chart realistically runs on Kubernetes in containers so thanos will be the only process running inside the container. When a memory request is set for the container, thanos will only see the request/limit as the available memory. There should not be any problem setting enable-auto-gomemlimit to true.

Of course when there is no memory request/limit the thanos container will see the full system memory as the available memory so enable-auto-gomemlimit should in that case not be set automatically.

What alternatives have you considered?

Set --enable-auto-gomemlimit on each thanos component through args.

javsalgar commented 1 month ago

Hi!

Thank you so much for the feature request. I will forward it to the team, but as it is not a critical feature we cannot guarantee an ETA. If you want to speed up the process, would you like to submit a PR adding the feature?

github-actions[bot] commented 1 month ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

eden881 commented 1 month ago

Hi! My team would really appreciate this feature too. I can try picking it up if no one's working on it :smile:

javsalgar commented 1 month ago

For cassandra and scylladb we created helpers that used the resources section:

https://github.com/bitnami/charts/blob/main/bitnami/cassandra/templates/_helpers.tpl#L175

There is also the resourcesFieldRef section for env vars that could help too:

https://kubernetes.io/docs/concepts/workloads/pods/downward-api/

github-actions[bot] commented 1 month ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.