Merge commit 'e257ca0a' into v0.3
Pipelines as Code CI / hwlab-nc01-v03-ci-poll- Success

This commit is contained in:
root
2026-07-09 10:02:27 +02:00
3 changed files with 33 additions and 6 deletions
+19
View File
@@ -604,6 +604,25 @@
"required": ["enabled", "serviceName", "endpointAddress", "port"],
"properties": {
"enabled": { "type": "boolean" },
"serviceName": {
"type": "string",
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
"endpointAddress": { "type": "string", "minLength": 1 },
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
"nodes": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/externalPostgresNodeOverride" }
}
},
"additionalProperties": false
},
"externalPostgresNodeOverride": {
"type": "object",
"required": ["serviceName", "endpointAddress", "port"],
"properties": {
"serviceName": {
"type": "string",
"minLength": 1,
+5
View File
@@ -384,6 +384,11 @@ lanes:
serviceName: jd01-pk01-platform-postgres
endpointAddress: 82.156.23.220
port: 5432
nodes:
NC01:
serviceName: nc01-host-postgres
endpointAddress: 10.42.0.1
port: 5432
runtimeStore:
postgres:
image: postgres:16-alpine
+9 -6
View File
@@ -5150,15 +5150,18 @@ function v02PostgresManifest({ profile = "v02", migrationSql, source, image = "p
};
}
function externalPostgresConfigForLane(deploy, profile) {
function externalPostgresConfigForLane(deploy, profile, args = {}) {
if (!isRuntimeLane(profile)) return null;
const config = deploy?.lanes?.[profile]?.externalPostgres;
if (!config || config.enabled !== true) return null;
assert.ok(typeof config.serviceName === "string" && config.serviceName.length > 0, `deploy.lanes.${profile}.externalPostgres.serviceName is required`);
assert.ok(typeof config.endpointAddress === "string" && config.endpointAddress.length > 0, `deploy.lanes.${profile}.externalPostgres.endpointAddress is required`);
const port = Number(config.port ?? 5432);
const nodeId = effectiveSecretPlaneNodeId(args);
const nodeConfig = nodeId ? config?.nodes?.[nodeId] : null;
const effective = nodeConfig && typeof nodeConfig === "object" && !Array.isArray(nodeConfig) ? { ...config, ...nodeConfig } : config;
assert.ok(typeof effective.serviceName === "string" && effective.serviceName.length > 0, `deploy.lanes.${profile}.externalPostgres.serviceName is required`);
assert.ok(typeof effective.endpointAddress === "string" && effective.endpointAddress.length > 0, `deploy.lanes.${profile}.externalPostgres.endpointAddress is required`);
const port = Number(effective.port ?? 5432);
assert.ok(Number.isInteger(port) && port > 0 && port <= 65535, `deploy.lanes.${profile}.externalPostgres.port must be a valid TCP port`);
return { serviceName: config.serviceName, endpointAddress: config.endpointAddress, port };
return { serviceName: effective.serviceName, endpointAddress: effective.endpointAddress, port };
}
function externalPostgresManifest({ profile = "v03", config, source }) {
@@ -5960,7 +5963,7 @@ async function plannedFiles(args) {
for (const profile of profiles) {
const namespace = namespaceNameForProfile(profile);
const includeDeviceAgent = profile === "dev";
const externalPostgres = externalPostgresConfigForLane(deploy, profile);
const externalPostgres = externalPostgresConfigForLane(deploy, profile, args);
const workbenchRedis = workbenchRuntimeRedisConfigForProfile(deploy, profile);
const runtimeConfigMaps = runtimeConfigMapsForProfile(deploy, profile);
const runtimeSecretPlane = await runtimeSecretPlaneConfigForProfile(deploy, profile, args);