diff --git a/config/hwlab-node-lanes.yaml b/config/hwlab-node-lanes.yaml index 28a416ca..c2d2755c 100644 --- a/config/hwlab-node-lanes.yaml +++ b/config/hwlab-node-lanes.yaml @@ -141,7 +141,8 @@ lanes: renderDir: runtime-v03 runtimeStore: postgres: - poolMax: 20 + poolMax: 40 + connectionTimeoutMs: 5000 tektonDir: tekton-v03 argoApplicationFile: application-v03.yaml registryPrefix: 127.0.0.1:5000/hwlab diff --git a/scripts/src/hwlab-node-lanes.ts b/scripts/src/hwlab-node-lanes.ts index 96b71815..9bb19d2b 100644 --- a/scripts/src/hwlab-node-lanes.ts +++ b/scripts/src/hwlab-node-lanes.ts @@ -81,6 +81,7 @@ export interface HwlabRuntimeExternalPostgresSpec { export interface HwlabRuntimePostgresStoreSpec { readonly poolMax: number; + readonly connectionTimeoutMs?: number; } export interface HwlabRuntimeStoreSpec { @@ -587,7 +588,16 @@ function runtimeStoreConfig(value: unknown, path: string): HwlabRuntimeStoreSpec const raw = asRecord(value, path); const postgres = raw.postgres === undefined ? undefined : asRecord(raw.postgres, `${path}.postgres`); return { - ...(postgres === undefined ? {} : { postgres: { poolMax: numberField(postgres, "poolMax", `${path}.postgres`) } }), + ...(postgres === undefined + ? {} + : { + postgres: { + poolMax: numberField(postgres, "poolMax", `${path}.postgres`), + ...(postgres.connectionTimeoutMs === undefined + ? {} + : { connectionTimeoutMs: numberField(postgres, "connectionTimeoutMs", `${path}.postgres`) }), + }, + }), }; }