From 17e24b14f4e6535e775716da63fed4394e078136 Mon Sep 17 00:00:00 2001 From: Sheldan <5037282+Sheldan@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:22:13 +0100 Subject: [PATCH] [OPB-xxx] enabling to configure database pool sizes externally --- .../executable/src/main/resources/application.properties | 1 + deployment/helm/oneplus-bot/templates/deployment.yaml | 4 ++++ deployment/helm/oneplus-bot/values.yaml | 2 ++ 3 files changed, 7 insertions(+) diff --git a/application/executable/src/main/resources/application.properties b/application/executable/src/main/resources/application.properties index 7c7b6f2..c27871c 100644 --- a/application/executable/src/main/resources/application.properties +++ b/application/executable/src/main/resources/application.properties @@ -1,6 +1,7 @@ spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME} spring.datasource.username= ${DB_USER} spring.datasource.password= ${DB_PASS} +spring.datasource.hikari.maximum-pool-size=${hikariPoolSize} spring.jpa.hibernate.default_schema=abstracto spring.jpa.properties.hibernate.default_schema=abstracto spring.quartz.jdbc.initialize-schema=never diff --git a/deployment/helm/oneplus-bot/templates/deployment.yaml b/deployment/helm/oneplus-bot/templates/deployment.yaml index 1d39f93..f5816b1 100644 --- a/deployment/helm/oneplus-bot/templates/deployment.yaml +++ b/deployment/helm/oneplus-bot/templates/deployment.yaml @@ -71,6 +71,10 @@ spec: secretKeyRef: name: api-keys key: youtubeApiKey + {{- range $key, $value := .Values.bot.propertyConfig }} + - name: {{ $key | quote }} + value: {{ $value | quote}} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/deployment/helm/oneplus-bot/values.yaml b/deployment/helm/oneplus-bot/values.yaml index c09b1ee..884a985 100644 --- a/deployment/helm/oneplus-bot/values.yaml +++ b/deployment/helm/oneplus-bot/values.yaml @@ -19,6 +19,8 @@ bot: failureThreshold: 3 config: newsForumPostNotificationServerId: + propertyConfig: + hikariPoolSize: 10 templateDeployment: enabled: true