fix(spire-server): Support duration strings for connMaxLifetime (#752)

* fix(spire-server): Support duration strings for connMaxLifetime

Signed-off-by: Shubham Hibare <[email protected]>

* fix

Signed-off-by: Shubham Hibare <[email protected]>

---------

Signed-off-by: Shubham Hibare <[email protected]>
This commit is contained in:
Shubham Hibare
2026-02-19 10:55:11 -08:00
committed by GitHub
parent 730b76bbaa
commit 3daadc6456
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ In order to run Tornjak with simple HTTP Connection only, make sure you don't cr
| `dataStore.sql.externalSecret.key` | The key of the secret object whose value is the dataStore.sql password | `""` |
| `dataStore.sql.maxOpenConns` | The maximum number of open db connections | `100` |
| `dataStore.sql.maxIdleConns` | The maximum number of idle connections in the pool | `2` |
| `dataStore.sql.connMaxLifetime` | The maximum amount of time a connection may be reused. If 0, time is unlimited | `0` |
| `dataStore.sql.connMaxLifetime` | The maximum amount of time a connection may be reused. Supports duration strings (e.g., "1h", "30m", "3600s") or 0 for unlimited. Duration strings are recommended to prevent connection accumulation. | `0` |
| `dataStore.sql.disableMigration` | True to disable auto-migration functionality | `false` |
| `dataStore.sql.region` | Region to use when database type is either aws_mysql or aws_postgresql | `""` |
| `dataStore.sql.readOnly.enabled` | Set to true to configure a readOnly dartabase connection | `false` |
@@ -153,7 +153,7 @@ plugins:
{{- end }}
max_open_conns: {{ .Values.dataStore.sql.maxOpenConns }}
max_idle_conns: {{ .Values.dataStore.sql.maxIdleConns }}
{{- if ne (int .Values.dataStore.sql.connMaxLifetime) 0 }}
{{- if and .Values.dataStore.sql.connMaxLifetime (ne (toString .Values.dataStore.sql.connMaxLifetime) "0") }}
conn_max_lifetime: {{ .Values.dataStore.sql.connMaxLifetime }}
{{- end }}
disable_migration: {{ .Values.dataStore.sql.disableMigration }}
+1 -1
View File
@@ -196,7 +196,7 @@ dataStore:
maxOpenConns: 100
## @param dataStore.sql.maxIdleConns The maximum number of idle connections in the pool
maxIdleConns: 2
## @param dataStore.sql.connMaxLifetime The maximum amount of time a connection may be reused. If 0, time is unlimited
## @param dataStore.sql.connMaxLifetime The maximum amount of time a connection may be reused. Supports duration strings (e.g., "1h", "30m", "3600s") or 0 for unlimited. Duration strings are recommended to prevent connection accumulation.
connMaxLifetime: 0
## @param dataStore.sql.disableMigration True to disable auto-migration functionality
disableMigration: false