feat: add JD01 YAML-first deployment support

This commit is contained in:
Codex
2026-06-29 08:13:34 +00:00
parent fe917bec4a
commit 076c4b643d
49 changed files with 10909 additions and 5223 deletions
+9 -1
View File
@@ -300,10 +300,11 @@ function agentRunRuntimeNamespaceManifest(spec: AgentRunLaneSpec): Record<string
function agentRunPostgresManifest(spec: AgentRunLaneSpec): Record<string, unknown> {
const localPostgres = spec.deployment.localPostgres;
if (!localPostgres.enabled || localPostgres.serviceName === null || localPostgres.image === null || localPostgres.storage === null || localPostgres.port === null) {
if (!localPostgres.enabled || localPostgres.serviceName === null || localPostgres.image === null || localPostgres.storage === null || localPostgres.port === null || localPostgres.database === null || localPostgres.user === null) {
throw new Error(`localPostgres is enabled for ${spec.version} without renderable YAML fields`);
}
const name = localPostgres.serviceName;
const secretName = spec.database.secretRef.name;
return {
apiVersion: "v1",
kind: "List",
@@ -330,6 +331,13 @@ function agentRunPostgresManifest(spec: AgentRunLaneSpec): Record<string, unknow
name: "postgres",
image: localPostgres.image,
ports: [{ name: "postgres", containerPort: localPostgres.port }],
env: [
{ name: "POSTGRES_DB", valueFrom: { secretKeyRef: { name: secretName, key: "POSTGRES_DB" } } },
{ name: "POSTGRES_USER", valueFrom: { secretKeyRef: { name: secretName, key: "POSTGRES_USER" } } },
{ name: "POSTGRES_PASSWORD", valueFrom: { secretKeyRef: { name: secretName, key: "POSTGRES_PASSWORD" } } },
{ name: "PGDATA", value: "/var/lib/postgresql/data/pgdata" },
],
volumeMounts: [{ name: "data", mountPath: "/var/lib/postgresql/data" }],
},
],
},