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:
@@ -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.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.maxOpenConns` | The maximum number of open db connections | `100` |
|
||||||
| `dataStore.sql.maxIdleConns` | The maximum number of idle connections in the pool | `2` |
|
| `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.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.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` |
|
| `dataStore.sql.readOnly.enabled` | Set to true to configure a readOnly dartabase connection | `false` |
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ plugins:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
max_open_conns: {{ .Values.dataStore.sql.maxOpenConns }}
|
max_open_conns: {{ .Values.dataStore.sql.maxOpenConns }}
|
||||||
max_idle_conns: {{ .Values.dataStore.sql.maxIdleConns }}
|
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 }}
|
conn_max_lifetime: {{ .Values.dataStore.sql.connMaxLifetime }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
disable_migration: {{ .Values.dataStore.sql.disableMigration }}
|
disable_migration: {{ .Values.dataStore.sql.disableMigration }}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ dataStore:
|
|||||||
maxOpenConns: 100
|
maxOpenConns: 100
|
||||||
## @param dataStore.sql.maxIdleConns The maximum number of idle connections in the pool
|
## @param dataStore.sql.maxIdleConns The maximum number of idle connections in the pool
|
||||||
maxIdleConns: 2
|
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
|
connMaxLifetime: 0
|
||||||
## @param dataStore.sql.disableMigration True to disable auto-migration functionality
|
## @param dataStore.sql.disableMigration True to disable auto-migration functionality
|
||||||
disableMigration: false
|
disableMigration: false
|
||||||
|
|||||||
Reference in New Issue
Block a user