diff --git a/charts/mastodon/Chart.yaml b/charts/mastodon/Chart.yaml index 6d49805e91d9d85d67c1132b5ed8f6e8ccade0f1..4a947aae207cd090c7b1321dbb0bdaf5bc09cd15 100644 --- a/charts/mastodon/Chart.yaml +++ b/charts/mastodon/Chart.yaml @@ -7,11 +7,11 @@ keywords: - mastodon - activitypub sources: - - https://github.com/tootsuite/mastodon + - https://github.com/mastodon/mastodon - https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/charts/mastodon type: application -version: 3.0.6 +version: 3.0.7 appVersion: v3.5.5 dependencies: diff --git a/charts/mastodon/README.md b/charts/mastodon/README.md index 7fbdde45d803ff6f626e26a713e94524f20cb4ed..a5187be305e7096c4dfb52e32a07ff7d66d86b7c 100644 --- a/charts/mastodon/README.md +++ b/charts/mastodon/README.md @@ -1,6 +1,6 @@ # mastodon -   +   Mastodon is a free, open-source social network server based on ActivityPub. @@ -8,7 +8,7 @@ Mastodon is a free, open-source social network server based on ActivityPub. ## Source Code -* <https://github.com/tootsuite/mastodon> +* <https://github.com/mastodon/mastodon> * <https://git.shivering-isles.com/shivering-isles/infrastructure-gitops/-/tree/main/charts/mastodon> ## Requirements diff --git a/charts/mastodon/templates/_helpers.tpl b/charts/mastodon/templates/_helpers.tpl index 207780b3456d691d16a013b7e89fabfd8edec867..2d1196e8d008ef17c7f6cb664afa623f51584dd4 100644 --- a/charts/mastodon/templates/_helpers.tpl +++ b/charts/mastodon/templates/_helpers.tpl @@ -136,3 +136,15 @@ Return true if a mastodon secret object should be created {{- true -}} {{- end -}} {{- end -}} + +{{/* +Find highest number of needed database connections to set DB_POOL variable +*/}} +{{- define "mastodon.maxDbPool" -}} +{{/* Default MAX_THREADS for Puma is 5 */}} +{{- $poolSize := 5 }} +{{- range .Values.mastodon.sidekiq.workers }} +{{- $poolSize = max $poolSize .concurrency }} +{{- end }} +{{- $poolSize | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/mastodon/templates/configmap-env.yaml b/charts/mastodon/templates/configmap-env.yaml index 3a1df65fac101a54b27df14b78de0063f59dead7..4d01955689e64a27ed27d7ebdbf8816252fd2e95 100644 --- a/charts/mastodon/templates/configmap-env.yaml +++ b/charts/mastodon/templates/configmap-env.yaml @@ -13,7 +13,7 @@ data: DB_PORT: {{ .Values.postgresql.postgresqlPort | default "5432" | quote }} {{- end }} DB_NAME: {{ .Values.postgresql.auth.database }} - DB_POOL: {{ .Values.mastodon.sidekiq.concurrency | quote }} + DB_POOL: {{ include "mastodon.maxDbPool" . }} DB_USER: {{ .Values.postgresql.auth.username }} DEFAULT_LOCALE: {{ .Values.mastodon.locale }} {{- if .Values.elasticsearch.enabled }}