Skip to content
Snippets Groups Projects
Verified Commit c283e170 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

feat(mastodon): Database prepare statements

Cherry-Pick of https://patch-diff.githubusercontent.com/raw/mastodon/chart/pull/5.patch



[PATCH] Add the PREPARED_STATEMENTS environment variable and set it
 to its default value Being able to control it can be useful in situations
 where prepared statements don't work as expected. Once such case can be
 pgbouncer as provided by DigitalOcean for connection pooling.

Co-authored-by: default avatarCees-Jan Kiewiet <ceesjank@gmail.com>
parent ab991ce1
No related branches found
No related tags found
No related merge requests found
# mastodon # mastodon
![Version: 3.0.7](https://img.shields.io/badge/Version-3.0.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.5.5](https://img.shields.io/badge/AppVersion-v3.5.5-informational?style=flat-square) ![Version: 3.0.8](https://img.shields.io/badge/Version-3.0.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.5.5](https://img.shields.io/badge/AppVersion-v3.5.5-informational?style=flat-square)
Mastodon is a free, open-source social network server based on ActivityPub. Mastodon is a free, open-source social network server based on ActivityPub.
...@@ -17,7 +17,7 @@ Mastodon is a free, open-source social network server based on ActivityPub. ...@@ -17,7 +17,7 @@ Mastodon is a free, open-source social network server based on ActivityPub.
|------------|------|---------| |------------|------|---------|
| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | elasticsearch | 19.0.1 | | https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | elasticsearch | 19.0.1 |
| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | postgresql | 11.1.3 | | https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | postgresql | 11.1.3 |
| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | redis | 16.13.2 | | https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | redis | 17.3.14 |
## Values ## Values
...@@ -32,7 +32,7 @@ Mastodon is a free, open-source social network server based on ActivityPub. ...@@ -32,7 +32,7 @@ Mastodon is a free, open-source social network server based on ActivityPub.
| externalAuth.pam.enabled | bool | `false` | | | externalAuth.pam.enabled | bool | `false` | |
| externalAuth.saml.enabled | bool | `false` | | | externalAuth.saml.enabled | bool | `false` | |
| image.pullPolicy | string | `"IfNotPresent"` | | | image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"tootsuite/mastodon"` | | | image.repository | string | `"docker.io/tootsuite/mastodon"` | |
| image.tag | string | `""` | | | image.tag | string | `""` | |
| ingress.annotations | string | `nil` | | | ingress.annotations | string | `nil` | |
| ingress.enabled | bool | `true` | | | ingress.enabled | bool | `true` | |
...@@ -52,6 +52,7 @@ Mastodon is a free, open-source social network server based on ActivityPub. ...@@ -52,6 +52,7 @@ Mastodon is a free, open-source social network server based on ActivityPub.
| mastodon.persistence.assets.resources.requests.storage | string | `"10Gi"` | | | mastodon.persistence.assets.resources.requests.storage | string | `"10Gi"` | |
| mastodon.persistence.system.accessMode | string | `"ReadWriteOnce"` | | | mastodon.persistence.system.accessMode | string | `"ReadWriteOnce"` | |
| mastodon.persistence.system.resources.requests.storage | string | `"100Gi"` | | | mastodon.persistence.system.resources.requests.storage | string | `"100Gi"` | |
| mastodon.preparedStatements | bool | `true` | Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements |
| mastodon.s3.access_key | string | `""` | | | mastodon.s3.access_key | string | `""` | |
| mastodon.s3.access_secret | string | `""` | | | mastodon.s3.access_secret | string | `""` | |
| mastodon.s3.alias_host | string | `""` | If you have a caching proxy, enter its base URL here. | | mastodon.s3.alias_host | string | `""` | If you have a caching proxy, enter its base URL here. |
...@@ -73,7 +74,7 @@ Mastodon is a free, open-source social network server based on ActivityPub. ...@@ -73,7 +74,7 @@ Mastodon is a free, open-source social network server based on ActivityPub.
| mastodon.sidekiq.workers[0].affinity | object | `{}` | Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity | | mastodon.sidekiq.workers[0].affinity | object | `{}` | Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity |
| mastodon.sidekiq.workers[0].concurrency | int | `25` | Number of threads / parallel sidekiq jobs that are executed per Pod | | mastodon.sidekiq.workers[0].concurrency | int | `25` | Number of threads / parallel sidekiq jobs that are executed per Pod |
| mastodon.sidekiq.workers[0].name | string | `"all-queues"` | | | mastodon.sidekiq.workers[0].name | string | `"all-queues"` | |
| mastodon.sidekiq.workers[0].queues | list | `["default","push","mailers","pull","scheduler"]` | Sidekiq queues for Mastodon that are handled by this worker. See https://docs.joinmastodon.org/admin/scaling/#concurrency See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument | | mastodon.sidekiq.workers[0].queues | list | `["default,8","push,6","mailers,2","pull","scheduler"]` | Sidekiq queues for Mastodon that are handled by this worker. See https://docs.joinmastodon.org/admin/scaling/#concurrency See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument |
| mastodon.sidekiq.workers[0].replicas | int | `1` | Number of Pod replicas deployed by the Deployment | | mastodon.sidekiq.workers[0].replicas | int | `1` | Number of Pod replicas deployed by the Deployment |
| mastodon.sidekiq.workers[0].resources | object | `{}` | Resources for this specific deployment to allow optimised scaling, overwrites .Values.mastodon.sidekiq.resources | | mastodon.sidekiq.workers[0].resources | object | `{}` | Resources for this specific deployment to allow optimised scaling, overwrites .Values.mastodon.sidekiq.resources |
| mastodon.singleUserMode | bool | `false` | If set to true, the frontpage of your Mastodon server will always redirect to the first profile in the database and registrations will be disabled. | | mastodon.singleUserMode | bool | `false` | If set to true, the frontpage of your Mastodon server will always redirect to the first profile in the database and registrations will be disabled. |
......
...@@ -15,6 +15,7 @@ data: ...@@ -15,6 +15,7 @@ data:
DB_NAME: {{ .Values.postgresql.auth.database }} DB_NAME: {{ .Values.postgresql.auth.database }}
DB_POOL: {{ include "mastodon.maxDbPool" . }} DB_POOL: {{ include "mastodon.maxDbPool" . }}
DB_USER: {{ .Values.postgresql.auth.username }} DB_USER: {{ .Values.postgresql.auth.username }}
PREPARED_STATEMENTS: {{ .Values.mastodon.preparedStatements | quote }}
DEFAULT_LOCALE: {{ .Values.mastodon.locale }} DEFAULT_LOCALE: {{ .Values.mastodon.locale }}
{{- if .Values.elasticsearch.enabled }} {{- if .Values.elasticsearch.enabled }}
ES_ENABLED: "true" ES_ENABLED: "true"
......
...@@ -192,6 +192,9 @@ mastodon: ...@@ -192,6 +192,9 @@ mastodon:
# -- Enable statsd publishing via STATSD_ADDR environment variable # -- Enable statsd publishing via STATSD_ADDR environment variable
address: "" address: ""
# -- Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements
preparedStatements: true
ingress: ingress:
enabled: true enabled: true
annotations: annotations:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment