diff options
Diffstat (limited to 'chart/templates/_helpers.tpl')
-rw-r--r-- | chart/templates/_helpers.tpl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 207780b34..0e1804f91 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/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 }} |