Expose SQL Connection Options in docker template
@@ -34,6 +34,9 @@ persistence:
connectAttributes:
tx_isolation: 'READ-COMMITTED'
{{- end }}
+ maxConns: {{ default .Env.SQL_MAX_CONNS "20" }}
+ maxIdleConns: {{ default .Env.SQL_MAX_IDLE_CONNS "20" }}
+ maxConnLifetime: {{ default .Env.SQL_MAX_CONN_TIME "1h" }}
visibility:
sql:
pluginName: "mysql"
@@ -46,6 +49,9 @@ persistence:
connectAttributes:
tx_isolation: 'READ-COMMITTED'
{{- end }}
+ maxConns: {{ default .Env.SQL_VIS_MAX_CONNS "20" }}
+ maxIdleConns: {{ default .Env.SQL_VIS_MAX_IDLE_CONNS "20" }}
+ maxConnLifetime: {{ default .Env.SQL_VIS_MAX_CONN_TIME "1h" }}
{{- else if eq $db "postgres" }}
default:
sql:
@@ -55,9 +61,9 @@ persistence:
connectProtocol: "tcp"
user: {{ default .Env.POSTGRES_USER "" }}
password: {{ default .Env.POSTGRES_PWD "" }}
- maxConns: 20
- maxIdleConns: 20
- maxConnLifetime: "1h"
+ maxConns: {{ default .Env.SQL_MAX_CONNS "20" }}
+ maxIdleConns: {{ default .Env.SQL_MAX_IDLE_CONNS "20" }}
+ maxConnLifetime: {{ default .Env.SQL_MAX_CONN_TIME "1h" }}
visibility:
sql:
pluginName: "postgres"
@@ -66,9 +72,9 @@ persistence:
connectProtocol: "tcp"
user: {{ default .Env.POSTGRES_USER "" }}
password: {{ default .Env.POSTGRES_PWD "" }}
- maxConns: 20
- maxIdleConns: 20
- maxConnLifetime: "1h"
+ maxConns: {{ default .Env.SQL_VIS_MAX_CONNS "20" }}
+ maxIdleConns: {{ default .Env.SQL_VIS_MAX_IDLE_CONNS "20" }}
+ maxConnLifetime: {{ default .Env.SQL_VIS_MAX_CONN_TIME "1h" }}
{{- end }}
{{- if eq $es "true" }}
es-visibility:
