Skip to content

Commit

Permalink
add enable/disable setting to connection pool
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaimran08 committed Sep 17, 2024
1 parent 05fb931 commit 018eafa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serve/templates/studio-settings-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,15 @@ data:
DATABASES = {
'default': {
"ENGINE": "django.db.backends.postgresql",
{{ if .Values.studio.connectionPool.enabled }}
"OPTIONS": {
"pool": {
"min_size": {{ .Values.studio.connectionPool.minSize | default 2 }},
"max_size": {{ .Values.studio.connectionPool.maxSize | default 4 }},
"timeout": {{ .Values.studio.connectionPool.timeout | default 10 }},
}
},
{{ end }}
'NAME': '{{ .Values.postgresql.global.postgresql.auth.database }}',
'USER': '{{ .Values.postgresql.global.postgresql.auth.username }}',
'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
Expand Down
1 change: 1 addition & 0 deletions serve/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ studio:
fields:
- ''
connectionPool:
enabled: true
minSize: 2
maxSize: 4
timeout: 10
Expand Down

0 comments on commit 018eafa

Please sign in to comment.