Skip to content

Commit

Permalink
feat: allow configuring database connection pool limits
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Nov 28, 2024
1 parent 023e3c7 commit 3fbde64
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
10 changes: 10 additions & 0 deletions charts/trustify/templates/helpers/_postgres.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@ Arguments (dict):
{{- include "trustification.common.requiredEnvVarValue" (dict "value" .database.password "msg" "Missing value for database password" ) | nindent 2 }}
- name: {{ .prefix | default "TRUSTD_DB_" }}SSLMODE
value: {{ .database.sslMode | default "allow" }}

{{- with .database.minimumConnections }}
- name: {{ .prefix | default "TRUSTD_DB_" }}MIN_CONN
value: {{ . | quote }}
{{- end }}
{{- with .database.maximumConnections }}
- name: {{ .prefix | default "TRUSTD_DB_" }}MAX_CONN
value: {{ . | quote }}
{{- end }}

{{- end }}
10 changes: 10 additions & 0 deletions charts/trustify/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,16 @@
},
"sslMode": {
"$ref": "#/definitions/PostgresSslMode"
},
"minimumConnections": {
"description": "The minimum number of connections created in the connection pool.\n",
"type": "integer",
"minimum": 0
},
"maximumConnections": {
"description": "The maximum number of connections created in the connection pool.\n",
"type": "integer",
"minimum": 1
}
}
},
Expand Down
10 changes: 10 additions & 0 deletions charts/trustify/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,16 @@ definitions:
$ref: "#/definitions/ValueOrRef"
sslMode:
$ref: "#/definitions/PostgresSslMode"
minimumConnections:
description: |
The minimum number of connections created in the connection pool.
type: integer
minimum: 0
maximumConnections:
description: |
The maximum number of connections created in the connection pool.
type: integer
minimum: 1

PostgresSslMode:
type: string
Expand Down

0 comments on commit 3fbde64

Please sign in to comment.