From 018eafa5d56774862805330960060e2495ac09d3 Mon Sep 17 00:00:00 2001 From: Hamza Date: Tue, 17 Sep 2024 11:19:55 +0200 Subject: [PATCH] add enable/disable setting to connection pool --- serve/templates/studio-settings-configmap.yaml | 2 ++ serve/values.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/serve/templates/studio-settings-configmap.yaml b/serve/templates/studio-settings-configmap.yaml index 3de1364..a73c6a0 100644 --- a/serve/templates/studio-settings-configmap.yaml +++ b/serve/templates/studio-settings-configmap.yaml @@ -237,6 +237,7 @@ data: DATABASES = { 'default': { "ENGINE": "django.db.backends.postgresql", + {{ if .Values.studio.connectionPool.enabled }} "OPTIONS": { "pool": { "min_size": {{ .Values.studio.connectionPool.minSize | default 2 }}, @@ -244,6 +245,7 @@ data: "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'), diff --git a/serve/values.yaml b/serve/values.yaml index 03521a3..9a6049b 100644 --- a/serve/values.yaml +++ b/serve/values.yaml @@ -151,6 +151,7 @@ studio: fields: - '' connectionPool: + enabled: true minSize: 2 maxSize: 4 timeout: 10