uselagoon / build-deploy-tool

Tool to generate build resources
4 stars 6 forks source link

No requests set for ephemeral storage in mariadb-single deployment #326

Open britdm opened 3 months ago

britdm commented 3 months ago

I found in the mariadb-single deployment where, since the ephemeral storage does not have any requests set, that once deployed it will try to consume too much of the disk storage on the node it is deployed on. This causes DiskPressure and eventually if not mitigated by, for instance, patching in the requests, it will eventually kill the node.

As of now, only cpu and memory requests are defined, something small like 5Gi would be okay to use as default so the pod doesn't try to over consume storage.

https://github.com/uselagoon/build-deploy-tool/blob/997483b59ac7c055a07f04f579b91ccd7e4fb4a2/legacy/helmcharts/mariadb-single/values.yaml#L60-L62

e.g. ephemeral-storage: 5Gi

tobybellwood commented 3 months ago

In the scenario that uncovered this, what is the ephemeral storage being used for - there is persistent storage at /var/lib/mysql for the database, and /tmp is in-memory, so what is being stored and where?

britdm commented 3 months ago

In this case, the storage is using a custom path /var/lib/<storage-dir>/* and not the default persistent storage path. The size of /var/lib/mysql is very small, almost negligible.