groundhog2k / helm-charts

Helm charts for open source applications - ready to use for deployment on Kubernetes
MIT License
69 stars 56 forks source link

MariaDB Deployment vs Statefulset #1216

Closed tim-hanssen closed 1 year ago

tim-hanssen commented 1 year ago

Hey @groundhog2k

A few weeks ago you added the deployment option on the Redis chart. Now we are considering to use MariaDB for just some dumb logging.

So in that case we don't mind it would be emptied if the node goes offline.

Would het be an option to support for the MariaDB chart itm to be deployed as a Deployment instead of the current StatefulSet?

groundhog2k commented 1 year ago

I understand. I would like to check something first about actual PVC. The reason why it is a StatefulSet is the volumeClaimTemplate - which can be re-used after a new deployment. In case of a deployment you a) have to provide an existing PVC or b) create a new one during every deployment. or c) use the helm resource policy keep (helm.sh/resource-policy: keep). I would like to check if option c) is working in that case. For redis this was not important at all, but I now see a bug. In case it is deployed with a given PVC size it will not deploy because deployment will not support volumeClaimTemplates. I need to fix this and tryout a useful solution for mariadb.

tim-hanssen commented 1 year ago

Ah that makes sense, we don't use the volumeClaimTemplates not so thats why I didn't encounter it. Would be nice if we could make something like this work too.

groundhog2k commented 1 year ago

I think I found a way and also fixed the redis chart with https://github.com/groundhog2k/helm-charts/pull/1218

tim-hanssen commented 1 year ago

Yeah that seems valid I think! :) nice

groundhog2k commented 1 year ago

@tim-hanssen https://github.com/groundhog2k/helm-charts/pull/1219 will be the solution :-)