fix: align d601 v03 postgres source truth (#869)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-25 11:33:42 +08:00
committed by GitHub
parent cab3e83a4a
commit dc7bdd2c3c
2 changed files with 24 additions and 21 deletions
+23 -20
View File
@@ -142,26 +142,8 @@ lanes:
renderDir: runtime-v03
runtimeStore:
postgres:
mode: local-k3s
secretName: hwlab-v03-postgres
statefulSet: hwlab-v03-postgres
serviceName: hwlab-v03-postgres
adminUser: hwlab_v03
adminPasswordSourceRef: hwlab/d601-v03-postgres.env
adminPasswordSourceKey: HWLAB_V03_POSTGRES_PASSWORD
cloudApi:
secretName: hwlab-cloud-api-v03-db
secretKey: database-url
database: hwlab_v03
role: hwlab_v03
openfga:
secretName: hwlab-v03-openfga
secretKey: datastore-uri
authnKey: authn-preshared-key
postgresPasswordKey: postgres-password
database: hwlab_openfga
role: hwlab_openfga
poolMax: 16
mode: platform-service
poolMax: 4
connectionTimeoutMs: 5000
queryRetryMaxAttempts: 5
queryRetryInitialDelayMs: 250
@@ -400,6 +382,27 @@ lanes:
email: ops@pikapython.com
tls: auto
responseHeaderTimeoutSeconds: 600
externalPostgres:
provider: PK01
configRef: config/platform-db/postgres-pk01.yaml
serviceName: pk01-platform-postgres
endpointAddress: 82.156.23.220
port: 5432
sslmode: require
database: hwlab_d601_v03
cloudApi:
secretName: hwlab-cloud-api-v03-db
secretKey: database-url
sourceRef: hwlab/d601-v03-cloud-api-db.env
envKey: DATABASE_URL
role: hwlab_d601_v03_app
openfga:
secretName: hwlab-v03-openfga
secretKey: datastore-uri
sourceRef: hwlab/d601-v03-openfga-db.env
envKey: DATASTORE_URI
authnKey: authn-preshared-key
role: hwlab_d601_v03_app
networkProfiles:
node-ci-egress:
+1 -1
View File
@@ -10822,7 +10822,7 @@ function runtimeSecretSpec(input: { node: string; lane: string }): RuntimeSecret
const externalPostgres = runtimeLaneSpec?.externalPostgres;
const postgresStore = runtimeLaneSpec?.runtimeStore?.postgres;
const bootstrapAdmin = runtimeLaneSpec?.bootstrapAdmin;
const platformDb = externalPostgres !== undefined || postgresStore?.mode === "platform-service" || (postgresStore?.mode === undefined && /^v0*[3-9]\d*$/.test(input.lane));
const platformDb = externalPostgres !== undefined || postgresStore?.mode === "platform-service";
const localPostgresService = postgresStore?.serviceName ?? `${namespace}-postgres`;
const platformPostgresService = externalPostgres?.serviceName ?? postgresStore?.serviceName ?? "g14-platform-postgres";
const legacyPostgresHost = `${localPostgresService}.${namespace}.svc.cluster.local`;