diff --git a/config/hwlab-node-lanes.yaml b/config/hwlab-node-lanes.yaml index 8762d172..60f13d16 100644 --- a/config/hwlab-node-lanes.yaml +++ b/config/hwlab-node-lanes.yaml @@ -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: diff --git a/scripts/src/hwlab-node-impl.ts b/scripts/src/hwlab-node-impl.ts index ec072022..792ee4df 100644 --- a/scripts/src/hwlab-node-impl.ts +++ b/scripts/src/hwlab-node-impl.ts @@ -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`;