Merge remote-tracking branch 'origin/master' into feat/hwlab-1119-d601-external-db

# Conflicts:
#	config/platform-db/postgres-pk01.yaml
#	scripts/src/platform-db.ts
This commit is contained in:
Codex
2026-06-12 21:22:18 +00:00
28 changed files with 4467 additions and 237 deletions
+160
View File
@@ -9,6 +9,8 @@ metadata:
- 280
- 281
- 1119
- 297
- 300
cluster:
role: primary
@@ -86,6 +88,9 @@ postgres:
- id: D601-public
cidr: 36.49.29.73/32
purpose: platform-infra-and-hwlab-v03-app
- id: G14-public
cidr: 202.98.17.68/32
purpose: platform-infra-runtime
tuning:
maxConnections: 50
sharedBuffers: 512MB
@@ -141,6 +146,66 @@ postgres:
user: hwlab_d601_v03_app
address: 36.49.29.73/32
method: scram-sha-256
- type: hostssl
database: langbot
user: langbot
address: 10.0.8.0/22
method: scram-sha-256
- type: hostssl
database: postgres
user: langbot
address: 10.0.8.0/22
method: scram-sha-256
- type: hostssl
database: langbot
user: langbot
address: 74.48.78.17/32
method: scram-sha-256
- type: hostssl
database: postgres
user: langbot
address: 74.48.78.17/32
method: scram-sha-256
- type: hostssl
database: langbot
user: langbot
address: 202.98.17.68/32
method: scram-sha-256
- type: hostssl
database: postgres
user: langbot
address: 202.98.17.68/32
method: scram-sha-256
- type: hostssl
database: n8n
user: n8n
address: 10.0.8.0/22
method: scram-sha-256
- type: hostssl
database: postgres
user: n8n
address: 10.0.8.0/22
method: scram-sha-256
- type: hostssl
database: n8n
user: n8n
address: 74.48.78.17/32
method: scram-sha-256
- type: hostssl
database: postgres
user: n8n
address: 74.48.78.17/32
method: scram-sha-256
- type: hostssl
database: n8n
user: n8n
address: 202.98.17.68/32
method: scram-sha-256
- type: hostssl
database: postgres
user: n8n
address: 202.98.17.68/32
method: scram-sha-256
secrets:
source: master-local
@@ -174,6 +239,34 @@ secrets:
HWLAB_D601_V03_DB_NAME: hwlab_d601_v03
randomHex:
HWLAB_D601_V03_DB_PASSWORD: 32
- name: langbot-db-credentials
sourceRef: platform-db/langbot-db.env
type: env
requiredKeys:
- LANGBOT_DB_USER
- LANGBOT_DB_PASSWORD
- LANGBOT_DB_NAME
createIfMissing:
enabled: true
values:
LANGBOT_DB_USER: langbot
LANGBOT_DB_NAME: langbot
randomHex:
LANGBOT_DB_PASSWORD: 32
- name: n8n-db-credentials
sourceRef: platform-db/n8n-db.env
type: env
requiredKeys:
- N8N_DB_USER
- N8N_DB_PASSWORD
- N8N_DB_NAME
createIfMissing:
enabled: true
values:
N8N_DB_USER: n8n
N8N_DB_NAME: n8n
randomHex:
N8N_DB_PASSWORD: 32
objects:
roles:
@@ -195,6 +288,24 @@ objects:
createdb: false
createrole: false
superuser: false
- name: langbot
passwordRef:
sourceRef: platform-db/langbot-db.env
key: LANGBOT_DB_PASSWORD
login: true
attributes:
createdb: false
createrole: false
superuser: false
- name: n8n
passwordRef:
sourceRef: platform-db/n8n-db.env
key: N8N_DB_PASSWORD
login: true
attributes:
createdb: false
createrole: false
superuser: false
databases:
- name: sub2api
owner: sub2api
@@ -206,6 +317,16 @@ objects:
encoding: UTF8
locale: C.UTF-8
extensions: []
- name: langbot
owner: langbot
encoding: UTF8
locale: C.UTF-8
extensions: []
- name: n8n
owner: n8n
encoding: UTF8
locale: C.UTF-8
extensions: []
exports:
connectionStrings:
@@ -254,6 +375,36 @@ exports:
- scope: hwlab-v03
secret: hwlab-v03-openfga
key: datastore-uri
- name: langbot-database-url
sourceSecretRef: platform-db/langbot-db.env
render:
envKey: DATABASE_URL
format: postgresql://$(LANGBOT_DB_USER):$(LANGBOT_DB_PASSWORD)@$(PGHOST):5432/$(LANGBOT_DB_NAME)?sslmode=require
variables:
PGHOST: 82.156.23.220
writeToSecretSource:
sourceRef: platform-infra/langbot.env
key: DATABASE_URL
mode: update-or-insert
consumers:
- scope: platform-infra
secret: langbot-secrets
key: DATABASE_URL
- name: n8n-database-url
sourceSecretRef: platform-db/n8n-db.env
render:
envKey: DATABASE_URL
format: postgresql://$(N8N_DB_USER):$(N8N_DB_PASSWORD)@$(PGHOST):5432/$(N8N_DB_NAME)?sslmode=require
variables:
PGHOST: 82.156.23.220
writeToSecretSource:
sourceRef: platform-infra/n8n.env
key: DATABASE_URL
mode: update-or-insert
consumers:
- scope: platform-infra
secret: n8n-secrets
key: DATABASE_URL
backup:
phase: minimum-restoreable
@@ -284,6 +435,15 @@ observability:
- kind: psql-app-role
database: sub2api
user: sub2api
- kind: psql-app-role
database: hwlab_d601_v03
user: hwlab_d601_v03_app
- kind: psql-app-role
database: langbot
user: langbot
- kind: psql-app-role
database: n8n
user: n8n
- kind: disk-free
path: /var/lib/postgresql/16/main
minFreeGiB: 10